Jump to content
Sign in to follow this  
fuci

How to set Respawn Height (Elevation) ?

Recommended Posts

Hello everyone

I hope someone can help me with this, is there any script to select the elevation on a respawn marker?

i made a simple respawn system with the Marker for west and east

thanks in advance

Share this post


Link to post
Share on other sites

I used onPlayerRespawn.sqf and setPos to set the height. No idea if there is an easier method.

Create a file called onPlayerRespawn.sqf in the mission directory and add something like this as its contents:

private ["_unit", "_axisx", "_axisy"];

_unit  = _this select 0;
_axisx = getPos _unit select 0;
_axisy = getPos _unit select 1;

switch (side _unit) do
{
   case west: { _unit setPos [_axisx, _axisy,  2] };
   case east: { _unit setPos [_axisx, _axisy, -3] };
};

Change the last digit to adjust the height. More info on respawn stuff

Edited by Magirot
Typo

Share this post


Link to post
Share on other sites

Yeay it works =D

A big big thank you for that, i searched everywhere for this but couldnt find it!

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  

×