STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
0
IN-GAME
25
ONLINE
Founded
15 October, 2012
ModEvents.res Discussion
There's a lot to go through in modevents.res, so I thought it would be useful to create a topic on findings, inconsistencies, questions, etc.

I'll start it out with a question. Is there a specific event for protecting a player from a common infected? I can't seem to find it. Or is there nothing specifically for that, possibly a manipulation of other events? Maybe it could be something with player_hurt where the attacker ID was killed but gave no damage.
< >
Showing 1-7 of 7 comments
shotgunefx 16 Feb, 2013 @ 5:05pm 
Haven't seen one for that, but I did notice a few oddities
player_hurt fires an extra time after a player kills another player but passes attacker and attackerentid both 0

Also weapon_out_of_ammo doesn't seem to fire when viewing with display_game_events

Same with tank_killed
Last edited by shotgunefx; 16 Feb, 2013 @ 5:09pm
76561198007334207 16 Feb, 2013 @ 10:35pm 
The wiki says display_game_events should should boomer_exploded when we pop one. It instructs us to use developer 0/1. I don't think our version has it, though I'm not assuming that's cause of the missing display of events. I'm seeing a pattern here; is this the same thing?
Rectus 17 Feb, 2013 @ 2:39am 
You can enable developer mode with either the -dev or -allowdebug switch when starting the game. I don't think it's differs from the developer cvar.

For protecting against damage from commons you can use AllowTakeDamage instead.
function AllowTakeDamage(damageTable) { //DeepPrintTable(damageTable) // Handy for debugging if ((damageTable.Attacker.GetClassname() == "infected") && (damageTable.Victim.GetClassname() == "player")) { return false; } return true; }

The "infected" classname is only used for commons, SI use "player".
Last edited by Rectus; 17 Feb, 2013 @ 2:40am
Winded 19 Feb, 2013 @ 7:45am 
Is there any way to convert the User ID to Entity ID?
shotgunefx 19 Feb, 2013 @ 8:07am 
Not that I know of. I just ended up using an entity reference as a key. Also player_spawn isn't in modevent, but it does work.
Rayman1103 19 Feb, 2013 @ 8:34am 
Originally posted by shotgunefx:
Also player_spawn isn't in modevent, but it does work.
Yep, that's because it's in GameEvents.res located in, ...Left 4 Dead 2 Beta/left4dead2/pak01_dir.vpk/resource.
shotgunefx 19 Feb, 2013 @ 8:47am 
I was going by the wiki (or what it had said, not sure now). Thanks for the info
< >
Showing 1-7 of 7 comments
Per page: 1530 50