Jump to content
Sign in to follow this  
speeder

Variable Respawntime

Recommended Posts

Is it possible to let the players (when in the multoplayer lobby) decide the respawn time, and if yes, how?

I've tried this:

///////////////////////////////////////////////////////////////////////////////////////////
respawn = "BASE";
respawndelay = Param1;
disabledAI = 0;
///////////////////////////////////////////////////////////////////////////////////////////

titleParam1 = "Respawn time";
valuesParam1[] = {1, 3, 6, 10};
defValueParam1 = 1;
textsParam1[] = {"1 sec", "3 sec", "6 sec", "10 sec"};

///////////////////////////////////////////////////////////////////////////////////////////

But I just spawn right away. Like 0.1 sec after I'm dead no matter what I select.

Share this post


Link to post
Share on other sites

The script you posted won't work.

Multiple reasons but first and foremost the variable Param1 does not exist in that content and at that point.

The variable can be accesed after mission initialization. You can still decide the respawn time by simply adding an eventhandler on player death and doing a black screen + disabled input whilst respawn time != 0.

Share this post


Link to post
Share on other sites

So there is no way to make it selectable from the lobby?

Share this post


Link to post
Share on other sites

You cannot reassign a value to the respawndelay.

What you actually need to do is create a cutscene after a players death to simulate a respawn.

In other words define a very quick respawn delay, say 0.1

Set your base respawn marker to an offshore island or somewhere where he wont be affected by anything going on in the mission

Attach a killed event handler to all playable units, the script that this runs would then

Load a cutscene, or even better Kegety's spectator system and then after your virtual respawn delay has timed, out, setpos him to the playabale area and break out of the cutscene

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×