Jump to content
Sign in to follow this  
odyseus

Respawn in individual places

Recommended Posts

Hello guys, I have around 10 players. Each ahve thei individual name "player1", but all from the same factions. I need to have each of them respawn on 10 diferent and individual places. What is the best way to go about doing that?

I was thinking on something like this

player1 respawn on respawn1

Player2 respawn on respawn2

and etc...

Can anyone help? Thx

Share this post


Link to post
Share on other sites

Post the code you are using to respawn the players first then we can add in what you are missing.

Share this post


Link to post
Share on other sites

That is the problem. I m not using anycode. Since i cant code. That is just my logic. I was hope someone could help me out! ;)

Share this post


Link to post
Share on other sites

BLUFOR units respawn on the marker respawn_west. You can create a trigger that moves players to another position when they respawn. Say player1 respawns, he ends up at respawn_west. Then he should get moved to player1_respawn. playerN should end up at playerN_respawn where N is the number.

You create the respawn_west marker, preferable away from all the action. Then we create a trigger, BLUFOR PRESENT (assuming players are blufors), set it to REPEATABLE and then the condition:

player in thisList

Which is true whenever the local player is in the trigger.

Now we want to move the player, we find the name of the player, eg. player1 and add "_respawn" to it to get the marker name. Then the player is moved there. We use this in the On Act:

0 = [] call {
   _pName = vehicleVarName player; 
   _markerName = format ["%1_respawn", _pName];
   _respawnPos = getMarkerPos _markerName;
   if (_respawnPos select 0 != 0) then {
       player setPos _respawnPos;
   };
};

Edited by Muzzleflash

Share this post


Link to post
Share on other sites

Thank you Muzzleflash. I was able to get one player"1" to respawn "1". Now to get the second one should i make a triger for each player "2" to respawn "2"?

---------- Post added at 02:47 PM ---------- Previous post was at 02:32 PM ----------

I got it!!!! now what if player 1 has a unit of 5 ther player and player 2 also have 5 other players and they are all bluefor?? then how should i go about doing it? :D THX again! you saved my life!

Share this post


Link to post
Share on other sites
Thank you Muzzleflash. I was able to get one player"1" to respawn "1". Now to get the second one should i make a triger for each player "2" to respawn "2"?

---------- Post added at 02:47 PM ---------- Previous post was at 02:32 PM ----------

I got it!!!! now what if player 1 has a unit of 5 ther player and player 2 also have 5 other players and they are all bluefor?? then how should i go about doing it? :D THX again! you saved my life!

That 1 marker should cover all players; which I assume was what you "got".

I'm not sure what you mean with: player 1 has a unit of 5.

Are the players controlling AI? AI's don't respawn. Or are you saying you have 2 different teams, eg. human BLUFORs vs. human OPFORs ?

Share this post


Link to post
Share on other sites

Thx brother! it seems ok now. I may have some more question later. :D Thx

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  

×