AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [L4D] Getting respawn time? (https://forums.alliedmods.net/showthread.php?t=82762)

Durzel 12-29-2008 13:25

[L4D] Getting respawn time?
 
I'm coming into this a bit cold I'm afraid, only my 2nd attempt at writing a SM. Specifically I'm looking into getting information on "time left to spawn" when playing as Infected in an L4D game.

My only experience previously has been with TF2 which as I understood it used "respawn waves" that were somewhat map & situation dependant, whereas from what I can gather purely from playtesting it is the Director that decides when player Infected can spawn - and the delay is skewed by the number of players on the Infected team, how quickly you died after your previous spawn, etc. There also doesn't seem to be any way of controlling this respawn interval either, even via cvars (unless I'm missing something obvious).

I read in another thread that very little can be done currently with the Director from a SM point of view, so I'm left wondering whether or not it's actually possible to get data in a SM on how long a given player has left to respawn?

Thanks in advance :)

Fyren 12-29-2008 18:18

Re: [L4D] Getting respawn time?
 
Not exactly what you want, but when an infected player dies in versus, when he enters ghost mode the ghost_respawn_time event is fired, which contains his respawn time. But of course the event is only fired once and you won't be able to modify the time with the event.

CTerrorPlayer has a m_ghostSpawnClockCurrentDelay netprop. Might be what you want, but I'm just looking through a netprops dump and haven't tried anything with it. There's also m_isGhost, m_ghostSpawnClockMaxDelay, and m_ghostSpawnState.

Durzel 12-29-2008 22:31

Re: [L4D] Getting respawn time?
 
Not actually looking to modify it, so that info you've provided is very useful. Probably a stupid question this but without the SDK how do you know this information? :)

Dristol 12-30-2008 00:55

Re: [L4D] Getting respawn time?
 
CVARS:

z_ghost_checkpoint_spawn_interval : 30 : , "sv", "cheat" : Interval for spawning special zombies while survivors are in the checkpoint
z_ghost_finale_spawn_interval : 20 : , "sv", "cheat" : Interval for spawning special zombies during the finale
z_ghost_spawn_in_start : 0 : , "sv", "cheat" : Allow ghosts to materialize while players are in the start area
z_ghost_spawn_interval : 60 : , "sv", "cheat" : Interval for spawning special zombies

Help me lobby to get this added to the server cheats plugin so that we can change these values on the server...
http://forums.alliedmods.net/showthread.php?t=81101

Antithasys 12-30-2008 01:32

Re: [L4D] Getting respawn time?
 
Quote:

Originally Posted by Dristol (Post 735322)
CVARS:
Help me lobby to get this added to the server cheats plugin so that we can change these values on the server...
http://forums.alliedmods.net/showthread.php?t=81101

sm_cvar

And give your admins you want to be able to change it the cheat flag. No need for an additional plugin.

Fyren 12-30-2008 10:43

Re: [L4D] Getting respawn time?
 
Quote:

Originally Posted by Durzel (Post 735290)
Not actually looking to modify it, so that info you've provided is very useful. Probably a stupid question this but without the SDK how do you know this information? :)

Events are listed in the server's resource directory in the files named *event.res and I've happened to try ghost_respawn_time. I think someone's listed most of the events on the wiki, though mostly without documentation.

The netprops you can get with sm_dump_netprops, but then you have to search around for anything that sounds likely. I grepped for "ghost", "respawn", and "delay" I think.

Durzel 12-30-2008 12:11

Re: [L4D] Getting respawn time?
 
Quote:

Originally Posted by Dristol (Post 735322)
CVARS:

z_ghost_checkpoint_spawn_interval : 30 : , "sv", "cheat" : Interval for spawning special zombies while survivors are in the checkpoint
z_ghost_finale_spawn_interval : 20 : , "sv", "cheat" : Interval for spawning special zombies during the finale
z_ghost_spawn_in_start : 0 : , "sv", "cheat" : Allow ghosts to materialize while players are in the start area
z_ghost_spawn_interval : 60 : , "sv", "cheat" : Interval for spawning special zombies

Help me lobby to get this added to the server cheats plugin so that we can change these values on the server...
http://forums.alliedmods.net/showthread.php?t=81101

I was under the impression that z_ cvars only applied to non-player entities, but then I'm puzzled as to why the AI would need ghost attributes. Additionally there is definitely some variance to respawn, if there are only 2 out of 4 infected players then the respawn times tend to always be under 10 seconds. With 4 players playing I've seen respawns of 20-30 seconds.

Thanks for the info all. :)

Durzel 01-03-2009 11:39

Re: [L4D] Getting respawn time?
 
I'm getting this when I try and hook the event...

L 01/03/2009 - 16:37:02: [SM] Native "HookEvent" reported: Game event "ghost_respawn_time" does not exist

Using latest SP snapshot, etc. Do I just use HookEvent as I would any other function e.g. player_death, etc? Or should I assume that it's not possible to hook this event currently in SP?

Durzel 01-03-2009 12:12

Re: [L4D] Getting respawn time?
 
Disregard the above, I'm an idiot - it's ghost_spawn_time

Fyren 01-03-2009 20:14

Re: [L4D] Getting respawn time?
 
Heh, sorry. My fault, I guess. I had ghost_respawn_time in my reply way up there.

Cynic 02-18-2009 22:35

Re: [L4D] Getting respawn time?
 
I'm trying to figure out how to control the player infected spawn times.
"z_ghost_spawn_interval" only seems to control AI-controlled infected spawns, how to I adjust the max spawn time for players?

Marcus101RR 12-03-2009 19:26

Re: [L4D] Getting respawn time?
 
Same here i have been trying to figure that one out for 8 vs 8

Downtown1 12-08-2009 22:45

Re: [L4D] Getting respawn time?
 
Maybe detour CDirector::GetSpecialRespawnInterval ?

Frus 12-09-2009 00:01

Re: [L4D] Getting respawn time?
 
sm_cvar z_ghost_delay_max
sm_cvar z_ghost_delay_min


All times are GMT -4. The time now is 18:08.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.