Jump to content
Sneax x

Random Teleport Script

Recommended Posts

Deutsch:

Hallo,

Ich möchte ein Skript, das macht: Ein schild oder eine Flagge, auf die man klicken kann, Wenn man darauf klickt, wirst man zufällig auf einen von 15 Punkten teleportiert. Diese 15 Punkte kann ich manuell setzen wo ... ist das möglich?

ich weißt nicht wie sowas geht wäre nett wenn mir hier wer helfen kann!

 

 

English:

Hey,

i want a script that makes: A sign or a flag on that i can click. if i click on it you will teleported (random how) on one of 15 points. those 15 points can i manually set where... is this possibile?

i dont know how to do this... would be nice if somebody of you can help me!

 

Thanks!

MfG SneaX

  • Like 2

Share this post


Link to post
Share on other sites
4 hours ago, Sneax x said:

i want a script

 

Hello there Sneax x and welcome also to Bis Forums !

 

It's really easy to make it on your own if you want to try :

check here for the addaction code :

https://community.bistudio.com/wiki/addAction

 

and follow the example below :

			//	select a random marker , copy this inside the mission that you want to suffle the markers 
			_array = selectRandom[    
				"respawn_1",       
				"respawn_2",
				"respawn_3"
            ];		
			
			_pos = getmarkerPos _array;
			_caller setposASL _pos;

it's also easy to search about it in Youtube :

 

 

 

PS:share your try or solution !

  • Like 1

Share this post


Link to post
Share on other sites

Hey thank you for you answer but this script is not working at me

 

Quote

// select a random marker , copy this inside the mission that you want to suffle the markers

_array = selectRandom[ t1,t2,t3 ];

_pos = getmarkerPos _array;

_caller setposASL _pos;

and its this script doing: respawn random at those points t1,t3...?

 

i want to click an a flag pole or sign to get teleported random on one of (10) and every time i click its a other point?

so not a respawn script, a teleport script

 

thank you for the effort

Share this post


Link to post
Share on other sites

Hey there Sneax x, (a warm welcome from my side too). GEORGE FLOROS GR's script does exactly that. I will brake it down to all the commands with explanation comments for you.

private _markersArray = ["marker_1", "marker_2", "marker_3"]; // You place the names of the markers you want to use in the array. It is assumed that you have already created and named the markers (either in editor or with script commands)

private _randomMarker = selectRandom _markersArray; // Select one of the markers randomly
private _pos = getMarkerPos _randomMarker; // Get the position of the randomly selected marker
_caller setPosASL _pos; // Teleport the caller (assume you have access to him) to the position of the randomly selected marker

GEORGE FLOROS GR used some marker names that contain the word respawn (also used for respawning) but this does not mean they cannot be used for your purpose too. Just change the names and place names that are convenient for you (also..., make sure you have created the markers somehow).

 

Hope this clarifies a bit the script. Please don't hesitate to ask for more info if you need to.

  • Thanks 1

Share this post


Link to post
Share on other sites

Yes that worked!

 

Thank you very much!

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, ZaellixA said:

Hey there Sneax x, (a warm welcome from my side too). GEORGE FLOROS GR's script does exactly that. I will brake it down to all the commands with explanation comments for you.

 

This is the real teamwork !  :thumbs-up:

teamwork-quotes-ken-blanchard-600x600.jp

  • Like 1

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

×