Jump to content
Sign in to follow this  
sgt.cr@$h

Teleport vehicle with others players in.

Recommended Posts

Greetings,

after hours of searching my brain started to melt down from confusion from all those non working scripts around. So what i want is script allows me and other player to teleport together while we in same vehicle with no pre added markers or anything just by map click something like this one

openMap true;
sleep 1;
hint "Click on map to teleport.";
onMapSingleClick "player setPos _pos; onMapSingleClick ''; openMap false; true;";
waitUntil{!(visibleMap)};  

it allows me only to teleport, so is there's anything like it to allow the whole vehicle including players inside to teleport around?

Thanks in advance.

Share this post


Link to post
Share on other sites

onMapSingleClick "vehicle player setPos _pos; onMapSingleClick '';"

Should teleport the vehicle and its crew/cargo as well.

Share this post


Link to post
Share on other sites

Additionally you may want to get familiar with 'stackedEventhandlers' while you're at it. I only say this because for me, after BI added the stacked EH function, onMapSingleClick command seemed to work intermittently if not utilizing the stacked EH function :confused:

example

TAG_fnc_teleport = {
(vehicle player) setPos _pos;
hintSilent format ["Moved to grid %1", mapGridPosition player]; 
};

["Teleport_ID", "onMapSingleClick", "TAG_fnc_teleport"] call BIS_fnc_addStackedEventHandler;

Kind Regards,

Iceman77

Edited by Iceman77

Share this post


Link to post
Share on other sites

TAG_fnc_teleport = {
   (vehicle player) setPos _pos;
   hintSilent format ["Moved to grid %1", mapGridPosition player]; 
   ["Teleport_ID", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;
};

["Teleport_ID", "onMapSingleClick", "TAG_fnc_teleport"] call BIS_fnc_addStackedEventHandler;  

Does anyone notice that if you set this up to work for 1 teleport only it breaks the shift + LMB player waypoint function?

Try the above code, teleport, then open map again, press shift + Left Mouse Button and you do not get a waypoint.

Share this post


Link to post
Share on other sites

do not use this function BIS_fnc_addStackedEventHandler , i told BIS that you loose the shift + LMB player but nobody doesn't care so use this :

onMapSingleClick "vehicle player setPos _pos; onMapSingleClick '';true;";

  • 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
Sign in to follow this  

×