Jump to content
Sign in to follow this  
1para{god-father}

Teleport to various locations

Recommended Posts

I have had a quick search but could not find what I was looking for.

I need to be able to teleport from a flagpole to say 10 different positions so I can scroll through a list of names and pick one to teleport to. Using something like an invisible object

This will be for MP on a dedi server, has anyone done something like this ?

Any help would be most appreciate

Share this post


Link to post
Share on other sites
// Teleports a person to the marker "teleportDestination". You can place this marker anywhere on the map.
//
// To use: Add this script as an action on an item. EG:
//
//this addAction ["Teleport - Location Name Here","teleport.sqf",["Marker_Name_Here"]];
//this addAction ["Teleport - Base","teleport.sqf",["Base"]];
//this addAction ["Teleport - Airfield","teleport.sqf",["Airstrip"]];

// Get the destination.
_dest = (_this select 3) 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)-10*sin(_dir),(getMarkerPos _dest select 1)-10*cos(_dir)];

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  

×