Jump to content

Looking for simple teleport script!


spitfirez404

Recommended Posts

I have a mission similar to what you have in mind.

The mission itself, players look at an object and are teleported to a special trader

same thing to get back.

teleport _to.sqf

_pos = [[3436.75,14440.4,2.09933],[3439.35,14441.7,1.74573],[3439.79,14449.9,0.741669],[3434.78,14451.2,0.979614]] call bis_fnc_selectrandom;
cutText ["Hold Tight","BLACK OUT"];
sleep 1;
cutText ["","WHITE IN"];
player setVariable ["oldPosition",(position player),true];
player setPos _pos;

obviously, change your _pos to your positions,

Now to get back, you need this

teleport_back.sqf

player setPos (player getVariable ["oldPosition",[0,0,0]]);

you'll also need to edit your fn-selfactions.sqf, like @Mig mentioned in his first post so you get the action on your scroll wheel

you also posted in the wrong section, this is for script/mod releases.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...