zipman 0 Posted January 23, 2014 (edited) hi all I was hoping that someone might have or know of a temple and script I could look at and understand how a arma 3 mobile spawn vehicle mhq works, like teleport to mhq thanks for any help in this matter. Edited January 23, 2014 by zipman Share this post Link to post Share on other sites
iceman77 18 Posted January 23, 2014 (edited) There's no set way any given MHQ script(s) could work. If you want a teleport type, you can simply make an object in your base have an action, that teleports you into the vehicle. flag pole action /* -Add the action to the flag pole. -The action will only be available if the MHQ is alive and isn't moving. -The action will teleport the player to the vehicle's position and if there's room, move him into the cargo area of the MHQ. - Note: I never use 0 as the speed check because I don't trust it to be EXACTLY 0, at any given time, though it'd probably suffice... but just to be safe */ _id = myPole addaction [ "Teleport To MHQ", { (_this select 1) setPos getPos myMHQ; (_this select 1) moveInCargo myMHQ; }, nil, 1, false, true, "", "alive myMHQ && {speed myMHQ < 1}" //condition - if the MHQ is alive and isn't moving. ]; Edited January 23, 2014 by Iceman77 Share this post Link to post Share on other sites
zipman 0 Posted January 23, 2014 how and where would I put this code to work? what code do I put on the flagpole? what code to I put on the vehicle.? would you have a template of this working I could look at and read? thanks for taking the time to reply, Share this post Link to post Share on other sites
iceman77 18 Posted January 23, 2014 Give your MHQ a unique name. I used myMHQ as the name in the example. You can add the action simply by copy and pasting the code into your init.sqf and naming the object (flag pole) a unique name. I used myPole as the name in the example. Another way, would be to replace myPole with this and copy and paste the add action into the flag pole's initialization box within the editor. Share this post Link to post Share on other sites
zipman 0 Posted January 23, 2014 Thank you thank you thank you got it working right away. Share this post Link to post Share on other sites
zipman 0 Posted January 23, 2014 how can I get the name to show when you look at the flag pole?, if a user looks at the flag pole you would see "spawn to mhq" on the screen? Share this post Link to post Share on other sites
fight9 14 Posted January 23, 2014 Change the "1" between Nil and False to "6". That will make it so when your looking at the pole, the action will become the "default action" and show on screen. Share this post Link to post Share on other sites
zipman 0 Posted January 23, 2014 (edited) I have this _id = mypole addaction ["Teleport To MHQ",{(_this select 1)setPos getPos myMHQ;(_this select 1) moveInCargo myMHQ; },nil,6,false,true,"","alive myMHQ && {speed myMHQ < 1}"]; nil,6,false,true don't seem to do anything, I scroll my mouse it shows on the menu and screen but without scrolling the mouse it don't show when you look at it, Edited January 23, 2014 by zipman Share this post Link to post Share on other sites
Xeedo 10 Posted March 17, 2014 Is it possible to add to this code to make it possible to choose between multiple 'mhq' vehicles? Share this post Link to post Share on other sites
blasturbator 10 Posted March 18, 2014 Is it possible to add to this code to make it possible to choose between multiple 'mhq' vehicles? If you are referring to the post before yours then it's rather simple, just duplicate it with different vehicle names so it adds more actions for more vehicles. for example _id = mypole addaction ["Teleport To MHQ",{(_this select 1)setPos getPos myMHQ;(_this select 1) moveInCargo myMHQ; },nil,6,false,true,"","alive myMHQ && {speed myMHQ < 1}"]; _id2 = mypole addaction ["Teleport To MHQ 2",{(_this select 1)setPos getPos myMHQ2;(_this select 1) moveInCargo myMHQ2; },nil,6,false,true,"","alive myMHQ2 && {speed myMHQ2 < 1}"]; in which a "2" was added to all the name calls. Share this post Link to post Share on other sites
callmesarge 7 Posted September 6, 2014 Sorry to bump an old thread, but I have a question. In my mission, I have my MHQ respawn on a timer. But if it respawns, the teleport option no longer works - any idea why? I am using Icemans light vehicle respawn script to respawn the MHQ. Any idea what I can do to fix this? Share this post Link to post Share on other sites
iceman77 18 Posted September 9, 2014 You would need to use the advanced version. There is a link in the bottom portion of the initial post for the advanced version of LVR. The advanced version uses vehVarName command to store the name. Also some additional functionality possible. There is also a version that Larrow did (NSLVR). Share this post Link to post Share on other sites