Garry's Mod

Garry's Mod

NPC Flashlights System
61 Comments
Lymbio_21 4 Oct @ 1:14am 
what are the npcs in the images?
Jiyū to anzen  [author] 29 Aug @ 4:51pm 
Although it can only work if the weapon being switched to has a flashlight attachment, otherwise the flashlight will stay on. Still prevents more than one flashlight per-NPC though
Jiyū to anzen  [author] 29 Aug @ 4:49pm 
@Lynch added support for your addon
Lynch 26 Aug @ 10:39pm 
@Jiyū to anzen Thanks! Great addon btw!
Jiyū to anzen  [author] 26 Aug @ 10:38pm 
@Lynch Sure! I’ll add support.
Lynch 26 Aug @ 8:37pm 
Hello! I would like to suggest compatibility with my addon "Lynch's NPCs Essentials" and its Weapon Switching feature. When a Combine Soldier switches weapons, the flashlight from their previous weapon remains permanently on. I suggest making a change to the code to make the flashlight turn off if it detects that the NPC has switched active weapons. Thanks in advance.
Ebyprofen 26 Aug @ 6:03am 
fuck
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.
01 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.
01 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
jj1 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
-_ΩmegaTheFlower_- 18 Apr @ 8:22am 
This person below me is a GENIUS, I bet they're gonna be the next Albert Einstein!11!!1!!
Friday_Maxsus228 7 Apr @ 1:28am 
d:steamthumbsup:
Friday_Maxsus228 7 Apr @ 1:27am 
i like it
Никитка 6 Apr @ 10:58am 
+rep nice job
pablo.gonzales.2013 7 Mar @ 8:31am 
i see a bright future for your modding skills, trust
Guyguyga 6 Mar @ 8:04pm 
It's not because of the mods. I just tried on a fresh install. I don't know what causes it. That said, it would be cool if this mod and the buddies mod worked together more reliably.
Guyguyga 6 Mar @ 6:13pm 
It might be conflicting with other mods. I have a "combat buddies" mod that spawns followers, and they spawn at the beginning of every map, and they, along with normal npcs don't always have working flashlights.

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3309330691
Jiyū to anzen  [author] 6 Mar @ 5:54pm 
@Guyguyga Thanks for letting me know… weird, I’ve had no problems with it… but I’ll check it out when I can.
Guyguyga 6 Mar @ 5:24pm 
@Jiyū to anzen Well dang. Thanks for the info though. Taught me something new today. I wish I could give your addon multiple likes instead of just one.

Also, sometimes the flashlights don't work, especially when spawning into a new map, requiring me to use the admin "clean up" utility multiple times until the flashlights eventually work.

Is there any way to....perhaps increase the reliability of this addon? The combine flashlights addon turns on without fail. I don't know if the difference between your codes is significant , but perhaps it's worth checking out?
Jiyū to anzen  [author] 5 Mar @ 11:26pm 
@Guyguyga The source engine won’t allow 180 and anything above that, same for anything 0 or under- it can’t be fixed.
Guyguyga 4 Mar @ 8:28pm 
Could you give the flashlight infinite fov? like 360 degrees for example?
WolfBite 24 Feb @ 1:58am 
Very awesome! Thank you for your contribution to the community! :) Great for realism <3
Kazeha 19 Feb @ 1:44am 
is there a way to force the npc to open flashlight?
UNIT1 15 Feb @ 11:13am 
possible to add a console command regarding a npc itself instead of a weapon?
I have some VJ base snpcs where the weapon itself isn't usable so i can't find it entity name
and i want them to have a flashlight....
Jiyū to anzen  [author] 12 Feb @ 9:43pm 
@NeoRed Gamer07 That is planned for the next update.
NeoRed Gamer07 12 Feb @ 7:04pm 
you should consider making a spawn menu tab for easier setting changes
(if there is already one i cannot find/see it)
pablo.gonzales.2013 11 Feb @ 12:59pm 
i have no idea what your next idea is, but if its another banger i will subscribe to it as well
gambersiop 11 Feb @ 11:47am 
Great:melon:
Jiyū to anzen  [author] 10 Feb @ 5:41pm 
@An_Unkown_Player[FIN] That is planned in the next update, yes.
An_Unknown_Player[FIN] 10 Feb @ 1:57pm 
Could add a flashlight brightness command?
Jiyū to anzen  [author] 9 Feb @ 3:49pm 
@Hex It's E3 2002 Combine Soldiers
Hex 9 Feb @ 3:46pm 
hey what are those npcs on screenshots
Jiyū to anzen  [author] 9 Feb @ 11:54am 
Map used is gm_exordium
fortnitewarzone 9 Feb @ 11:44am 
whats the map on the gif is it just one of the hl2 maps
Air 9 Feb @ 10:45am 
There's no way this isn't
Baby Wizard 9 Feb @ 8:53am 
This gigachad managed to be in the MOST popular addons 3 times at the same time LOL
BASED you must be doing something right
Witherman126 9 Feb @ 8:23am 
This is honestly a great addon.
If you want a lighter weight, closer to source engine combine flashlight then go with this. It's very good for what it aims to do

If you want a more "cinematic" flashlight go with Zelektra's combine flashlight mod.

Or be like me, get both and toggle between them whenever you feel like it.
Callsign_Ewok 9 Feb @ 5:16am 
You know, this is a great idea, I might mess with this right now...
seabazian 8 Feb @ 3:05pm 
make an option to make it head-mounted like the other
pablo.gonzales.2013 8 Feb @ 11:03am 
this is cool as hell
Kerk 8 Feb @ 6:42am 
amazing mod
Nicholas 8 Feb @ 3:53am 
this one is a lot more Source Engine style than the other one.