Left 4 Dead 2

Left 4 Dead 2

VScript Dynamic Survivor Flashlights
84 Comments
Sayachii 23 Jun @ 8:34am 
Understandable. This is still incredibly cool and useful for the more horror-themed corrections.
Ptprost  [author] 23 Jun @ 12:03am 
@Sayachii No, I'm just not interested enough to make it.
Sayachii 22 Jun @ 3:34pm 
Is there a chance you'll make a version for the lasersights? (They appear for everyone else but the client's model, mostly a thirdpersonshoulder thing)
Aurelíos 17 Jun @ 2:16pm 
Works better in customs maps :steammocking:
CaptPatrick01 6 Jun @ 5:04pm 
@ 爱笑的佐巴扬 Looks like a problem with the source engine itself when a light entity hits a prop, since that problem occurs with the sourcemod flashlight mod too.
Pixel 26 May @ 2:43am 
it would've been nice if it wasnt for the second flashlight following my first flashlight
爱笑的佐巴扬 23 May @ 9:39pm 
NPC's flashlight Will make Object modeling emit light, I hope to fix it.
@Ptprost
Yes
I actually had that problem and it was driving me crazy, so I was testing my mods to see if any of them were causing that conflict (although I didn't have any conflicts with any others in my mod list), and it made me even weirder.
Then I read the comments, and a guy typed the same command you mentioned, and that problem was solved for me :)
Also, I got this LITE version, it's lighter and better suited my needs :)
Ptprost  [author] 18 May @ 3:08pm 
@Колоссальный вет
Yeah, in testing survivor bots tended to only turn their flashlights on at the start of a level.
Setting "sb_flashlight" to 1 forces their flashlights to stay on, but I opted to not change that behavior. though valve probably didn't do that intentionally
@Ptprost
Is it normal for survivors not to turn on their lights? (Like the demo gift in the mod description) Because it's happening to me :/
Survivors turn their lights on, then turn them off, and stay like that for a few minutes or even longer, and with "luck" they turn them back on.
Inco 1 May @ 5:50pm 
@SHiFT_DeL3TE The incap animation does actually support full rotation if you inspect the survivors in HLMV, but the game is hardcoded to limit it to a certain range. VScript wouldn't be able to solve it, since it needs to be changed clientside too. It'd require source code changes.

It's probably limited that way because the animation does look pretty awkward when aiming behind yourself, although there's a technical reason for it (the parameter for looking left to right ranges from -180 and 180, -180 and 180 both represent directly behind, so the animation should look identical in both cases)
SHiFT_DeL3TE 29 Apr @ 3:50pm 
holy shit being able to see other survivor flashlights. Maybe soon we will fix the incap 180 turn animation into survivors actually being able to look behind them when downed.
JV17 9 Apr @ 4:37pm 
I used those commands because I suspect that the Source engine, being so old and limited, may not work properly with more particles/materials than allowed, so you have to remove or limit what is generated within the game.

By For example, you can see that the more zombies (or anything related to them), and even more so if they are hordes, somehow it starts to blink from less to more, this is "confirmed" with the "No infected" addon, from which no problem occurs at any time as there are no zombies or similar anywhere, but I repeat, this was my experience, I hope to give you an idea friend.
JV17 9 Apr @ 4:37pm 
Hi, in my experience, the sb_flashlight command (changed from 0 to 1) helps prevent flashlights from "disappearing." However, regarding the other issues, I don't know what the solution would be, at least for now, that is, the flashlights that "flash." In my case, I tried the following commands (reducing the "default" number of each):

z_background_limit
cl_ragdoll_limit
z_common_limit

But they didn't give a definitive result (at first, it seemed to work 100%, but then, despite the low probability, the bug you mentioned in the addon description occurred after a certain number of games, and to resolve this, I had to restart L4D2).
withextradip 23 Mar @ 8:11am 
When there are two flashlight textures merging, the transparent edges of the flashlight texture becomes opaque. Can you please fix this? Nonetheless, it's still a pretty decent addition. Just needs a few tweaks here and there.
Ptprost  [author] 15 Mar @ 1:17pm 
@IAmLiveLevi I think creating a lot of flashlights could stop some of the flashing, but ultimately these bugs seem to be impossible to fix via vscript. I think someone would need to patch the DLL which has the code for rendering the projected textures to screen. (Which I don't know how to do)
Jane Helldiver 13 Mar @ 1:09am 
Wouldve given me a seizure if I was prone but sick that i can see flashlights
LopesDark25x 12 Mar @ 9:55pm 
update!!! update!!!! so much bug
IAmLiveLevi 22 Feb @ 9:27am 
@Ptprost any update with the bug fixes?
Hakurei Reimu 22 Feb @ 2:49am 
finally l4d2 left 4 dead 2 dynamic flashlights
Ptprost  [author] 17 Feb @ 8:57am 
@Alpha I tested with nicholas cage flashlight and it worked.

@JV17 Not that I know of.

@Kaleidø.vtf loaing :gman:
Alpha 17 Feb @ 7:12am 
What the situation will be when I use custom flashlight pic (like high-light flashlight mod) ?
Kaleidø.vtf 16 Feb @ 9:44pm 
it says
printl(" loaing survivor flashights!");
did you mean loading?
JV17 16 Feb @ 7:35pm 
Is there any command or code in the console to prevent the lights disappearing?
JOHN 16 Feb @ 9:17am 
NICE! WORKS WITH DEDICATED SERVERS! (Of course you need to host one)
CaptPatrick01 15 Feb @ 8:01pm 
The dynamic light fallback was a good idea. Made the flickering less noticeable.
Cutsack 15 Feb @ 7:53pm 
disagree
joemarshlljmp 14 Feb @ 4:09pm 
Flashes of bright LED brighter then mine from other survivors, horrible!
Ziggy Z 004 13 Feb @ 5:53pm 
Been waiting so long for this. THANK YOU
Poolsup (TH) 13 Feb @ 11:03am 
flashlight vision is bug to low or medium detail
ꉓꂦꋪꉣꌗꍟ 13 Feb @ 9:05am 
FINALLY.
Nyxxie 12 Feb @ 9:02pm 
only took 15 years
金月茶 12 Feb @ 6:19pm 
Finally! :health:
Ptprost  [author] 12 Feb @ 7:31am 
@Solar It seems like most of the bugs are at the engine level, so I probably can't.
Solar 12 Feb @ 6:42am 
very buggy mod, do you plan on fixing the bugs?
SamZ0n3 12 Feb @ 4:27am 
THIS IS WHAT FLASHLIGHT MOD I'M LOOKING FOR!!!!!!!:steamhappy: THANK YOU!!!!!!:chainsaw:
Јамеѕ 11 Feb @ 7:27pm 
@bob the doggo It's fun, and I'm not nearly as bad as your spelling or punctuation (or lack of).
Trixxite 11 Feb @ 5:46pm 
@Ptprost bruhhh my bad I didn't see that xd
Thank youuu kind person for this amazing mod
Ptprost  [author] 11 Feb @ 3:32pm 
@Trixxite I actually already made a version that only uses dynamic lights, there's a link at the bottom of the description where it says "Lite Version"
Trixxite 11 Feb @ 2:33pm 
@Ptprost I see! To me it seems that it's just the projected flashlight textures from your teammates which flicker constantly, but the dynamic light cast seems to work just fine. Idk how hard that would be to implement but would it be possible to work on a version without the projected flashlight textures but just the dynamic light? Otherwise, this is an amazing mod
TheNamelessKing 9 Feb @ 11:59pm 
Legendary Mod, its taken yrs for something like this to show up, now all we need is a mod to have the screamer and boomer and leaker in the same game, theres a leaker version but we also need screamer included
Ptprost  [author] 9 Feb @ 4:09pm 
@RF True, but I wanted to keep the fact where if you perform certain actions your flashlight briefly moves away. Though I could probably detect if the cvar that attaches the flashlight to the player's camera is enabled to have an option for that.

@MrDanny You're right, but I won't be making that, because it was hard enough attaching a flashlight to the guns, which has more room for error than a laser, and it would also duplicate laser sights on all survivors' guns.

@Trixxite Unfortunately, that bug seems to be luck of the draw, and I don't know of any way I can fix it, and it *might* also depend on how well the game is running, but if it keeps happening you're probably better off not using this.
Trixxite 9 Feb @ 2:46pm 
the flashlights flicker like hell on every map i play, someone found any fix for that yet?
baddude1337 9 Feb @ 4:29am 
Yes!! Finally!! Somebody made a Vscript version! Was the only thing I was missing from Sourcemod!
Unsants 8 Feb @ 4:54pm 
It's good but it crashes the game
Crabby Cakes 8 Feb @ 3:03pm 
idk if its the flashlight mod im using or mod compat, but the other flashlights flicker so much its distracting
ph0roggy 8 Feb @ 6:12am 
YOUR CHANNEL NAME
Bob 8 Feb @ 5:40am 
how bad you should be to play whit sixteen bots
3ipKa* 8 Feb @ 2:59am 
Cool idea.
By the way: "env_projectedtexture — This is the most expensive light entity in the engine, use sparingly. Newer hardware with a good CPU can handle it better".
Inexorable 8 Feb @ 2:55am 
If you want a collection that contains all the HD/4k workshop items for a nextgen L4D2, go there
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3412880941