STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
2
IN-GAME
34
ONLINE
Founded
15 October, 2012
Showing 191-197 of 197 entries
19
Vscript Suggestions
One more though ... for generalizing mutations without having to spec them to a specific map, having some way of retrieving a spawn point in the flow would be nice.
vector GetSpawnPosition( int prefereddirection, float distance) // Retrieves a spawn position in given flow direction using furthest survivor in flow, or furthest behind depending on preferreddirection vector GetSpawnPositionFrom(vec frompos, int prefereddirection, float distance) // Retrieves a spawn position in given flow direction from vec

ex: spawn_at <- GetSpawnPosition(SPAWN_IN_FRONT_OF_SURVIVORS, 1000); // returns null if it fails

Maybe a way of ascertaining flow relative to survivors for any given entity as well, Something like...

int IsAheadInFlow(vec) // true if ahead, false otherwise

So for instance , say you wanted to randomly spawn things behind doors, you could loop through the prop_door_rotatings, collect the ones further in flow (IsAheadInFlow) then use GetSpawnPositionFron on the door to make sure you spawn behind it, Of course it would be helpful to know if the door was open, unlocked etc.


Also, the code from the previous post in code tags. I guess I should have read the formatting help. Too bad we can't preview posts

DirectorOptions -> { function OnSpawnCommon(props){ // vary common speed and health props[health] = props[health] + RandomInt(-10,10) props[zspeed] = props[zspeed] + RandomInt(-10,10) // I just made up zspeed but I digress.. return props } function OnSpawnSpecial(etype, props){ TankMdls <- [ ["models\infected\hulk.mdl", 0 ], ["models\infected\super_tank.mdl",2000] ]; if (etype == ZOMBLIE_TANK){ // spawn a tank or super tank local tanktype = RandomInt(0,1); props[health] = props[health]+ TankMdls[tanktype][1]; props[model] = props[health]+ TankMdls[tanktype][0]; } return props } }

Great update. Still diving in, but some quicks thoughts based on what people have asked for help on over the years and things I’ve wanted to do myself that I think would be helpful for mutations but also custom campaigns.

FYI These appear to be undocumented...
.IsSurvivor()
.GetActiveWeapon()
.GetZombieType()

Things that would be really useful to have

.IsPlayerIncapacitated()

Some way to distinguish between real Health, Real vs Temporary
GetRealHealth() // returns actual health regardless of temporary health. Also maybe SetRealHealth(num)

.IsDead() // would be nice though this could be derived from (player.GetHealth() == 1 && !player.IsPlayerIncapacitated())
.IsGhost()
.isHangingFromLedge()

CDirector::HowAngy () // returns a value between 0-1

CDirector.GetMaxSurvivorFlow() // returns the total flow to the saferoom/rescue instead of hard coding it per map like the bridge gauntlet

Something like nav_flow_target that doesn’t affect scoring so we can make survivors go to places off the flow or in a non-linear fashion. That or have the nav_flow_target’s original map spawn location used in scoring regardless of where it’s moved to when recomputing flow. Currently directing flow this way breaks scoring as the first target aquired they get 100% travel

Input to make a bot move to location of caller. Similar to nb_move_to_cursor

Input to make a bot attack caller.

Something like TraceLineTraceLine(Vector, Vector, handle) from Portal’s vscript. Right now it’s virtually impossible to interact with the world dynamically.

The ability to read entity KeyValues would also be nice
5
2/11 Update
119
List of Problems and Suggestions
Showing 191-197 of 197 entries