STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
3
IN-GAME
40
ONLINE
Founded
15 October, 2012
shotgunefx 21 Feb, 2013 @ 11:53am
Knowing map transition is done, weapons with missing ammo, and other odds and ends...
Is there a reliable way to know that transitioning is complete? For instance, say I want to reset health on subsequent maps, depending on the load in time, sometimes this works, others it happens too early and then get's set to the previous level.

I'm also having instances where some weapons only have one clip of ammo and no more.

What might be nice in addition to AllowWeaponSpawn, is something akin to AllowTakeDamage that allows us to modify a weapon spawn. So we might adjust the ammo count, change weapon type, or return false to spawn nothing.

Also, is there a way to do something on the end of a round? I would like to have a short stats screen occur with round statistics when the survivors are safe but it jumps right to the "We're Safe For Now" screen.

Perhaps we could have a hook, like OnActivate that if exists, is called before transition to the next map? And pauses the tranistion until we return false, or times out (maybe 5 seconds)

Also wouldn't hate being able to set the color of HUD element text.
< >
Showing 1-5 of 5 comments
Rectus 24 Feb, 2013 @ 11:25am 
For the ammo issue, you can set the ammo keyvalue ith the table if you spawn weapons with the CreateSingleSimpleEntityFromTable(entTable) function.

Ii got it to work the same way as ThaiGrocer explains here. It seems to give double the extra ammo you input.
shotgunefx 24 Feb, 2013 @ 1:50pm 
The ammo issue is only with SOME default spawns. you can use ent.__KeyValueFromInt("ammo",NUM) on already spawned items, and while it returns true, it doesn't actually work.

I found an easier solution, Convert the non spawn versions into spawn versions, so in weaponsToConvert....
weapon_smg = "weapon_smg_spawn" // etc

As far as the non-spawn versions being borked, I wonder if it has something to do with the spawnflags being set to 2, I think those are the flags for the spawner being incorrectly applied to the non-spawn version. If you look at a normal weapon_weaponname, the spawnflags will be something like 1073741824

I still have some issues with load-in. What I did was use map_transition to set the survivor's health before the next map. This works perfectly unless they are incapped, so I need to figure a way around that.
Last edited by shotgunefx; 24 Feb, 2013 @ 1:58pm
shotgunefx 24 Feb, 2013 @ 1:56pm 
Other thing I should mention, those borked weapons? While you can't use them,
ent_fire !picker use
, does work. Strange
Rectus 24 Feb, 2013 @ 11:18pm 
That's weird, I'm using the non-spawn versions in Gun Hunt, and haven't come across any I can't pick up.
shotgunefx 25 Feb, 2013 @ 2:36am 
It's not all of them, just some. Just stock maps. , using weaponsToConvert = _spawn variant fixed it 100%. Like the guns in C1m1 after you get out of the elevator in that little room, a bunch of other places. C11m1, the guns would have one clip in the starting area, etc
< >
Showing 1-5 of 5 comments
Per page: 1530 50