jandrews 116 Posted March 6, 2014 (edited) I have one now and I think its broken. We are using this for JIP and it has been modified some. Does this look correct? Its not working on our DS. init.sqf /* if (!isServer && isNull player) then //JIP player { waitUntil {!isNull player}; [] execVM "initTeleportToSL.sqf"; }; */ if (!isServer) then { sleep 10; if (time > (2*10)) then {execVM "initTeleportToSL.sqf";};// Teleport avaible after 2 minutes }; teleporttoSL.sqf /* Move player 3m behind his group leader or into leader's vehicle By Megagoth1702, thanks to Sandiford and Cheesenoggin, slightly modified by ZZEZ */ private ["_leader","_LX","_LY","_LZ"]; //setting up basic variables _leader = leader player; //If leader's vehicle is the leader himself, move player 3m behind him if (vehicle _leader == _leader) then { //Getting the coords _LX = (getpos _leader select 0) + (3*sin ((getDir _leader) -180)); _LY = (getpos _leader select 1) + (3*cos ((getDir _leader) -180)); _LZ = (getpos _leader select 2); player setpos [_LX,_LY,_LZ]; player removeAction movetoSL; } //If leader is inside vehicle, move player into vehicle cargo else { /*Checking if there is room in the vehicle, gives hint if there is none if there is room, player is moved into cargo of leader's vehicle */ if ((vehicle _leader) emptyPositions "cargo"==0) then {hint "No room in squad leader's vehicle."} else { player moveincargo vehicle _leader; player removeAction movetoSL; }; }; initteleportSL sleep 5; movetoSL = player addAction ["Teleport To SL", "TeleportToSL.sqf"]; sleep 10; hintSilent "Use your scroll wheel to teleport to your squad leader"; sleep 180;//3min player removeAction movetoSL; ---------- Post added at 19:11 ---------- Previous post was at 18:36 ---------- updated post. Edited March 6, 2014 by JAndrews1 Share this post Link to post Share on other sites
PenguinInATuxedo 18 Posted March 7, 2014 (edited) This one is pretty good, http://forums.unitedoperations.net/index.php/topic/10467-jip-teleport-script/ But can only TP to SL so if the SL uses it they just TP to themselves. Edit, i see you are using the one i linked >.< egg on face. It works perfect for me in MP just i call it via a map object no mission init Edited March 7, 2014 by PenguinInATuxedo Share this post Link to post Share on other sites
jandrews 116 Posted March 7, 2014 "It works perfect for me in MP just i call it via a map object no mission init" How do you do that? Share this post Link to post Share on other sites
PenguinInATuxedo 18 Posted March 7, 2014 I just add an addaction to the object init field calling the TeleportToSL.sqf file. If you don't know how to do an addaction then you should look it up on the BIS wiki, normally I would just link you the line I am using but I'm typing this on my tablet in bed. Off the top of my head though should look like this this addaction ["Teleport To SL", "TeleportToSL.sqf"]; The first set of " " is where the text that will be displayed when you scroll wheel goes the second set of " " is where you put the path to the .sqf file you want to call. You can get very fancy with it and add colors and change font (I think) but you don't need that yet. Share this post Link to post Share on other sites