Jump to content
bong oh

How to apply different respawn times for different side?

Recommended Posts

I wanted the Bluefor team to have 2 minutes of respawn time and the CSAT team to have 30 seconds.

However, I looked up most of the documents about respawnDelay, but I couldn't find any part of that...

May I ask how you can solve this problem?

Share this post


Link to post
Share on other sites
2 hours ago, beno_83au said:

https://community.bistudio.com/wiki/setPlayerRespawnTime

 

Sets the time interval (in seconds) that the player must wait before respawn. It resets to mission default on mission start." In Single Player or when respawn type is GROUP or SIDE in Multiplayer, setting player respawn time has no effect, and playerRespawnTime will always return -1." 

 

so... no way to change that?

Share this post


Link to post
Share on other sites

Well, that is what it says, but highlighting that text doesn't really help. Are you trying this in single player? Is your respawn set to group? Is your respawn set to side?

  • Like 1

Share this post


Link to post
Share on other sites

Oh.. I'm sorry. I misunderstood that the purpose of your URL link was to confirm what I emphasized that phase in ARMA wiki. And, I thought the purpose was to show that the functions I said are not provided at all in the game.

I try to that in MP mission. and want applied that each side. 

Share this post


Link to post
Share on other sites
1 hour ago, bong oh said:

Oh.. I'm sorry. I misunderstood that the purpose of your URL link was to confirm what I emphasized that phase in ARMA wiki. And, I thought the purpose was to show that the functions I said are not provided at all in the game.

I try to that in MP mission. and want applied that each side. 

 

Respawning in SP has no sense if not scripted. So BI is ambiguous in this remark. Just note:  no error in SP and playRespawnTime returns -1 in SP.

 

setPlayerRespawnTime is EL. So runs on each hosted/client PC.

The best place is on initPlayerLocal.sqf

and a code like

if (playerSide == west) then {setPlayerRespawnTime 120} else {if (playerSide == east) then {setPlayerRespawnTime 10} };

Probably works also on playableUnits (they can respawn) which are local (so in player's group when player is leader),... must be tested.

 

  • Like 1

Share this post


Link to post
Share on other sites
On 12/13/2020 at 1:51 AM, pierremgi said:

 

Respawning in SP has no sense if not scripted. So BI is ambiguous in this remark. Just note:  no error in SP and playRespawnTime returns -1 in SP.

 

setPlayerRespawnTime is EL. So runs on each hosted/client PC.

The best place is on initPlayerLocal.sqf

and a code like

if (playerSide == west) then {setPlayerRespawnTime 120} else {if (playerSide == east) then {setPlayerRespawnTime 10} };

Probably works also on playableUnits (they can respawn) which are local (so in player's group when player is leader),... must be tested.

 

I'm sorry for the late reply. 
Even if I apply the script, respawn time in the game(in multiplayer menu) is applied first in multiplayer

 

Share this post


Link to post
Share on other sites
12 minutes ago, pierremgi said:

did you run it in initPlayerLocal.sqf?

yup. And It still doesn't apply separately, and respawn times setting in the game are applied...

I trying to find out why the sqf file settings are not applied.

Share this post


Link to post
Share on other sites

//onPlayerKilled.sqf

 

//Custom respawn time
if (playerSide == west) then {setPlayerRespawnTime 120};
if (playerSide == east) then {setPlayerRespawnTime 120};
if (playerSide == civilian) then {setPlayerRespawnTime 2};

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

×