auto respawn script!

Moddy

Veteran++
how do you code something like

if player dies

x amount of seconds after --> fire button

(so it's like autorespawn)
 
function autospawn(%timeDelay)
{
schedule("postAction(2048,IDACTION_FIRE1,1.0);", %timeDelay);
schedule("postAction(2048,IDACTION_BREAK1,1.0);", %timeDelay);
}

then just add autospawn(%timeInSeconds); to your onClientMessage() function under a statement that will let you know when you've died.
 
i have a standalone config... i'm assuming to edit the onClientMessage function I'd need to install presto?

function autospawn(%timeDelay)
{
schedule("postAction(2048,IDACTION_FIRE1,1.0);", 1.3);
schedule("postAction(2048,IDACTION_BREAK1,1.0);", 1.3);
}

rofl i tried looking thru some old autotaunt scripts for reference but they all include presto :shock:
 
You only need IDACTION_BREAK1. And the respawntime is usually 2 secs.

Edit: I have to say I don't recommend autorespawn. I made a script for it years ago and realized after 10 minutes it can't be used(reasons such as you don't give teammates enough time to see in TV where you drop flags, or that you have to go to observer for any little "breather"). Autorespawn is a default server option, and it's disabled on all servers for good reason.
 
Last edited:
Moddy said:
i have a standalone config... i'm assuming to edit the onClientMessage function I'd need to install presto?

function autospawn(%timeDelay)
{
schedule("postAction(2048,IDACTION_FIRE1,1.0);", 1.3);
schedule("postAction(2048,IDACTION_BREAK1,1.0);", 1.3);
}

rofl i tried looking thru some old autotaunt scripts for reference but they all include presto :shock:
well you'll need some sort of killtracking, otherwise you won't know when you died (duh)
 
Back
Top