Respawn time


(Sevren) #1

Greets,

Sorry if this has been discussed before but I searched every ET forums I could find with no luck.

Basically what I need to do is change the respawn time depending on how many players are on the server. I need to do this because I’m not running a popular server and there are many times when the number of players is gonna be equal or below 6, and when that happens the respawn time just becomes innappropriate for proper gameplay. I mean if it’s 2 vs 2 and both defending players get killed and it takes 30 secs to respawn, the game is basically over because it gives the other team enough time to cross the map and plant.

I was wondering if it was possible to do something like that in script file. I have never done an ET map so I’m not too familiar with creating script files, but I know each map comes with a script. I’ve looked at a few of them by extracting .pk3 files, and they all have two variables, wm_axisrespawntime and wm_alliesrespawntime, which define the maximum ammount of time it takes to respawn. I’ve also tried changing these values when specific events happen (like when a command post is built) and it seemed to work fine. However I need these values to change depending on how many players are on the server.

Is there a way to have something like this :

if (number_of_players >= 6)
{
wm_axisrespawntime 30
wm_alliesrespawntime 20
}
else
{
wm_axisrespawntime 15
wm_alliesrespawntime 10
}

which would basically cut in half the respawn time.

So is it possible to do something like this in a script file? Or would that code have to be built right into a mod?


(Ifurita) #2

Nope, not possible. I had asked a similar question a while ago and I believe the consensus was, it would be possible, somewhat kludgy, and would have to be incorporated into the map during the build, not possible via script mods


(Sevren) #3

Thanks for the quick reply!

:slight_smile:

Okay so if it’s not possible to do so in a map script, is there any other way to do it? It’s not possible to do it with rcon commands because changing the respawntime variables only takes effect after a restart.

Could it be built right into a mod? I guess if it could be built right into etpro/shrubmod/etpub/etc, and if we could have a variable loaded from a .cfg file that sets the ammount of players where the limbo time gets cut in half, that would be perfect :slight_smile:


(LION) #4

just write your own mod but dont think many ppl will load it, just because of your map ;/


(Sevren) #5

Great idea, I’ll write my own mod.

So… hrm… how do we do that?

:stuck_out_tongue:


(LION) #6

beg bacon :notworthy:


(carnage) #7

well actualy it may be posible…
with some clever scripting

this method would only work for the start of the map
Place a trigger around every spawn point

make the triggers only activatable for the first 10ms of the map
set each trigger to increamt a globa variable when fired

the chose the spawn location depending on the value of the globa variable

this would mean that the spawn can only be decide after the first spawn but it could say active a forward spawn if there are only say less than six players and set auto spawn there

it would not take into acut players that join after the startup but as long as the map isnt too long that wont be a big problem and if the warmum time is long enough so all player are ready to spawn on the startup


(Ifurita) #8

… would have to be incorporated into the map during the build …


(carnage) #9

ah sorry ifurita

btw off topic… are you on irc any more ifurita cos i have been meaning to catch u on it


(Ifurita) #10

http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=11659