Jump to content
Sign in to follow this  
avibird 1

spawning back using a set radius from the instant respawn #2. Can it be done!!#

Recommended Posts

Is there A way when using the respawn #2 instant can you have the player respawn in a 75 meter radius of the spot you were Killed in. Sometimes there was a dam good reason you were killed at that location lol. Can this be done with some code

Share this post


Link to post
Share on other sites

Hey jshock I looked at it but have no clue where to start. My problem is that my aspiration and mission design clearly superseded my script in knowledge Lol. How would you go about this.

Share this post


Link to post
Share on other sites

Janky.

_unit addEventHandler ["respawn", {
_position = [(getPosATL (_this select 0) select 0) + ((random 75)+(random -75)), (getPos (_this select 0) select 1) + ((random 75)+(random -75)), 0];
(_this select 0) setPosATL _position;
}];

---------- Post added at 19:03 ---------- Previous post was at 18:45 ----------

_unit addEventHandler ["respawn", {
_position = [[[getPos (_this select 0), 75]]] call BIS_fnc_randomPos;
(_this select 0) setPos _position;
}];

Share this post


Link to post
Share on other sites
_position = [[[getPos (_this select 0), 75]]] call BIS_fnc_randomPos;

Iceman, I think you're nested one level too deep there, buddy.

_position = [[getPos (_this select 0), 75]] call BIS_fnc_randomPos;

Share this post


Link to post
Share on other sites

I already tried it with just one array, as were usage instructions. The position is waaayy off. Moved me across Stratis.

---------- Post added at 21:24 ---------- Previous post was at 21:16 ----------

Which is stupid because it says the first parameter can be >> ARRAY - [center,radius]. Nest works though... [[center,radius]] ??

Edited by Iceman77

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  

×