Raised This Month: $ Target: $400
 0% 

[L4D] Getting respawn time?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Durzel
Member
Join Date: Aug 2008
Old 12-29-2008 , 13:25   [L4D] Getting respawn time?
Reply With Quote #1

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
Durzel is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 12-29-2008 , 18:18   Re: [L4D] Getting respawn time?
Reply With Quote #2

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.
Fyren is offline
Durzel
Member
Join Date: Aug 2008
Old 12-29-2008 , 22:31   Re: [L4D] Getting respawn time?
Reply With Quote #3

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?
Durzel is offline
Dristol
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 00:55   Re: [L4D] Getting respawn time?
Reply With Quote #4

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
Dristol is offline
Antithasys
Moderator
Join Date: Apr 2008
Old 12-30-2008 , 01:32   Re: [L4D] Getting respawn time?
Reply With Quote #5

Quote:
Originally Posted by Dristol View Post
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.
__________________
[my plugins]

When you think about asking a question... consider what have you tried?
Antithasys is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 12-30-2008 , 10:43   Re: [L4D] Getting respawn time?
Reply With Quote #6

Quote:
Originally Posted by Durzel View Post
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.
Fyren is offline
Durzel
Member
Join Date: Aug 2008
Old 12-30-2008 , 12:11   Re: [L4D] Getting respawn time?
Reply With Quote #7

Quote:
Originally Posted by Dristol View Post
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 is offline
Durzel
Member
Join Date: Aug 2008
Old 01-03-2009 , 11:39   Re: [L4D] Getting respawn time?
Reply With Quote #8

I'm getting this when I try and hook the event...

L 01/03/2009 - 167: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?

Last edited by Durzel; 01-03-2009 at 12:10.
Durzel is offline
Durzel
Member
Join Date: Aug 2008
Old 01-03-2009 , 12:12   Re: [L4D] Getting respawn time?
Reply With Quote #9

Disregard the above, I'm an idiot - it's ghost_spawn_time
Durzel is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 01-03-2009 , 20:14   Re: [L4D] Getting respawn time?
Reply With Quote #10

Heh, sorry. My fault, I guess. I had ghost_respawn_time in my reply way up there.
Fyren is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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