To find the answer to your question, use the search or choose a category to read the related questions.

Print this article   
Teleport Example
This example was created for ArmaHolic by DarkXess.

It is to show how simple "Script Snippets" or "Modules" etc are easy to set up for missions makers
by using and showing in the example form in which it was created.

How to use "Teleport Example"

Ok to use this very simple script, just simply make a script and name it "TeleportScript.sqf"

With this inside:

// Teleports a person to the marker. You can place this marker anywhere on the map.
// To use: Add this script as an action on an item via it's init field. EG:
//this addAction ["Teleport","TeleportScript.sqf",["here"]];

// 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)];

Now put an object (in my example ive used a flagpole) on the map with this in the init box:

this addAction ["Teleport","TeleportScript.sqf",["here"]];

Then put a marker where you want to teleport to and name that "here"

Done! simple as that, now you can use teleport in your missions.

Teleport Example - Original Source VIPER
Back To Top
Updated: Sunday 10th of June 2012 10:07 AM,  Asked By: DarkXess,  viewed 4281 times