DieselJC 196 Posted February 25, 2015 I have 2 MHQ's that players can teleport to ,the problem is I have them set as vehicles and when you teleport it puts you inside the vehicle. I want to change the vehicle to a Huron Container so I can move it using the Hemmt Tractor and a load script so I want the player to spawn OUTSIDE the container but cant figure out how to do that. I am just using a basic Mhq script I found here on the forum..any help would be great. Diesel Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted February 25, 2015 Pretty much you want them to spawn outside the model of the container. Which means radius. Find the part of the MHQ script which is something like player setPos ... and replace with either of the two options below: Option 1: _position = getPos <object>; if ((random 1) > 0.5) then { if ((random 1) > 0.5) then { player setPos [(((_position select 0) + 6) - (random 2)),(((_position select 1) + 6) - (random 2)),0]; } else { player setPos [(((_position select 0) - 6) - (random 2)),(((_position select 1) + 6) - (random 2)),0]; }; } else { if ((random 1) > 0.5) then { player setPos [(((_position select 0) - 6) + (random 2)),(((_position select 1) - 6) + (random 2)),0]; } else { player setPos [(((_position select 0) + 6) + (random 2)),(((_position select 1) - 6) + (random 2)),0]; }; }; Or more simply: Option 2: player setPos ((getPos <object>) findEmptyPosition [3,30,'Man']); Share this post Link to post Share on other sites
DieselJC 196 Posted February 25, 2015 Thanks for the reply..much appreciated..I will give this a shot..Thanks again! Diesel Share this post Link to post Share on other sites
champ-1 40 Posted February 25, 2015 Simple variant of this: _position = getPos <object>; if ((random 1) > 0.5) then { if ((random 1) > 0.5) then { player setPos [(((_position select 0) + 6) - (random 2)),(((_position select 1) + 6) - (random 2)),0]; } else { player setPos [(((_position select 0) - 6) - (random 2)),(((_position select 1) + 6) - (random 2)),0]; }; } else { if ((random 1) > 0.5) then { player setPos [(((_position select 0) - 6) + (random 2)),(((_position select 1) - 6) + (random 2)),0]; } else { player setPos [(((_position select 0) + 6) + (random 2)),(((_position select 1) - 6) + (random 2)),0]; }; }; would be: _pos = _yourPosHere; player setPos ([_pos, 5, 360] call BIS_fnc_relPos); Share this post Link to post Share on other sites
R3vo 2654 Posted February 25, 2015 [color="#FF8040"]Revo_fnc_Teleport [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_dest[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]alive[/b][/color] [color="#1874CD"]_dest[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]closeDialog[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [color="#FF0000"]3[/color] [color="#191970"][b]fadeSound[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]cutText[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"A few minutes later..."[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"BLACK OUT"[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]3[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]3[/color][color="#8B3E2F"][b];[/b][/color] [color="#000000"]player[/color] [color="#191970"][b]setPos[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#191970"][b]getPos[/b][/color] [color="#1874CD"]_dest[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#FF0000"]3[/color] [color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]getPos[/b][/color] [color="#1874CD"]_dest[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#FF0000"]3[/color][color="#8B3E2F"][b],[/b][/color] [color="#191970"][b]getPos[/b][/color] [color="#1874CD"]_dest[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]cutText[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"A few minutes later..."[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"BLACK IN"[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]5[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#FF0000"]2[/color] [color="#191970"][b]fadeSound[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]hint[/b][/color] [color="#7A7A7A"]"MHQ is currently not available."[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] Made with KK's SQF to BBCode Converter [MHQ_NAME] call Revo_fnc_Teleport Here's another one it personally use in one of my dialogues. Share this post Link to post Share on other sites
epicgoldenwarrior 11 Posted February 25, 2015 If those methods fail you can attachTo and detach. Share this post Link to post Share on other sites
R3vo 2654 Posted February 25, 2015 If those methods fail you can attachTo and detach. If those methods fail, he probably did something wrong. :D Share this post Link to post Share on other sites
epicgoldenwarrior 11 Posted February 25, 2015 xD lol Share this post Link to post Share on other sites