Jump to content
Sign in to follow this  
Cold Evil

Why don't the altitude of my teleporter script work?

Recommended Posts

// Teleports a person to the marker "(Name)". You can place this marker anywhere on the map.
// The marker can also be moved.
//
// To use: Add this script as an action on an item like a flag pole.
//
//this addAction ["Teleport - Para Jump","teleport.sqf",["PMC",1000]];
//this addAction ["Teleport - NATO Base","teleport.sqf",["NATO",0]];
//

// Get the destination.
_dest = (_this select 3) select 0;
_alti = (_this select 4) select 0;

// Get a random direction
_dir = random 359;

// Move the person 15 meters away from the destination (in the direction of _dir)
player SetPos [(getMarkerPos _dest select 0)-2*sin(_dir),(getMarkerPos _dest select 1)-2*cos(_dir)];
player setPosASL [position player select 0, position player select 1, _alti];

When i change the last line _alti to a number it work fine. but not when i use a parameter...

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  

×