Jump to content
coldice4

Dynamic respawn position

Recommended Posts

Hi,

 

I'm currently working on a mission in which all players and AI "die" in a scripted ambush in the beginning, and a few should respawn (to simulate surviving). But for that I need to set the respawn position dynamically, is there an easy way to do this? Currently I let them respawn and teleport them with setPos. But I guess there is a more beautiful way to do this. 

 

Thanks,

coldice

Share this post


Link to post
Share on other sites

I just set respawn = "BASE" in the description.ext, so the player respawns at the same position he dies. But that is inside a burning tank :D

Share this post


Link to post
Share on other sites

try simply moving the respawn_YOURSIDE marker to a new location before player can respawn, or simply make a script called onPlayerRespawn.sqf then teleport the players to the desired location after they respawn.

 

 

e.g

 

onPlayerRespawn.sqf

AUSMD_spawnPos = [getMarkerPos "Respawn_West",10 + random 10,random 360] call BIS_fnc_relPos; //find a position that is 10 to 20 meters from the respawn_west marker...random direction

player setPos AUSMD_spawnPos; //set player to new position

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

×