Garry's Mod

Garry's Mod

547 ratings
NPC Flashlights System
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
12.245 KB
4 Feb @ 9:31pm
18 Jul @ 1:48am
4 Change Notes ( view )

Subscribe to download
NPC Flashlights System

Description
First, I know that there is a very popular addon already on the workshop like this- however I made this a long time ago and decided to add things I thought were missing about Dynamic Combine Flashlights; only more with a focus towards humanoid npcs.

Main features with this are:

-Customizable color, fov, distance, and texture- some can be determined by whether the npc is combine or human.

-Light stays on gun after npc dies, and gets removed once player picks it up.

-Pretty lightweight.





---------------------------------------------------------------------

ConVars:

npc_flashlight_humans Enable flashlights for human NPCs.
npc_flashlight_combines Enable flashlights for Combine NPCs.
npc_flashlight_maxactive Maximum number of active flashlights allowed. Any env_projected_texture will be counted.

npc_flashlight_human_color (R G B) - Flashlight color for humans.
npc_flashlight_combine_color (R G B) - Flashlight color for combines.
npc_flashlight_distance (VALUE) - Flashlight distance.
npc_flashlight_human_texture (NAME) - Flashlight texture for humans.
npc_flashlight_combine_texture (NAME) - Flashlight texture for combines.
npc_flashlight_human_fov (VALUE) - Flashlight fov for humans.
npc_flashlight_combine_fov (VALUE) - Flashlight fov for combines.
npc_flashlight_lightlevel (VALUE) - Flashlight lightlevel to turn on.

npc_flashlight_Blacklist_Add (CLASS) - Adds weapon to blacklist
npc_flashlight_Blacklist_Remove (CLASS) - Removes weapon from blacklist

---------------------------------------------------------------------
Popular Discussions View All (1)
3
21 Jul @ 3:09pm
Bug Report
Potato PC[TW]
54 Comments
Kuobano 20 Aug @ 8:54am 
:steamthumbsup:
Potato PC[TW] 18 Aug @ 6:23am 
"NPC Flashlights System" don't seem to interact with mods related to day and night.

This refers to "Atmos - Day/Night and Weather Modification" and "Day & Night System."

However, their performance in the map:
"SCP 3008 The not so infinite IKEA"
is quite impressive.

Aside from these minor flaws, this mod is arguably the best I've found.
Wallhammer 10 Aug @ 6:37pm 
Will try.
Jiyū to anzen  [author] 9 Aug @ 9:19pm 
@Wallhammer That’s the env_projected_textures doing that. My code spawns engine entities which are not handled by my code after being spawned. You can try lowering shadow settings or tweaking projected texture convars- or you can just lower the max amount of flashlights allowed in the mod settings.
Wallhammer 9 Aug @ 8:21pm 
is it possible for you to add performance? for some reason with 3-4 npcs with flashlights on, the lights lag the hell out of my game. Will there be performance boosters to help, while also keeping it good?
An_Unknown_Player[FIN] 25 Jul @ 3:31pm 
Could you make a system so that you could use other attachments instead of only the "muzzle" one? So if a weapon were to have a "flashlight" attachment the light would use that instead of a muzzle, but if that attachment isn't available, then it would default to the "muzzle" attachment.
An_Unknown_Player[FIN] 11 May @ 9:53am 
"FarZ" is how far the light casts and "NearZ" is where the light starts.
Man in a can 10 May @ 10:11pm 
Hey. anyone here knows what does "FarZ" and "NearZ" does, I tried tweaking it and forgot the default values for it, I don't see any difference it makes so does this affect anything at all?
marlena.arnold 3 May @ 11:13am 
DR FREEMAN
jimjam1 24 Apr @ 7:04pm 
is it possible to make arc9 weapons compatible? flashlights dont go away after picking up dropped arc9 weapons, and they seem to just float infront of the npc's pelvis