dragonsyr 21 Posted December 7, 2013 how can i say " if (helicopter landed) then {hint"heli on ground"}; and if(player on foot (not flying or parachute fall) ) then {hint"player on ground"} Share this post Link to post Share on other sites
profcupcake 11 Posted December 7, 2013 You could try using getPos (or, specifically, getPos select 2). Share this post Link to post Share on other sites
iceman77 19 Posted December 7, 2013 (edited) waitUntil {isTouchingGround theHelo && {isTouchingGround player}}; hint "The helicopter and the player has touched the ground."; //do some things waitUntil {isTouchingGround theHelo || {isTouchingGround player}}; hint "The helicopter or the player has touched the ground."; //do some things waitUntil {isTouchingGround theHelo && {! (player in theHelo)}}; hint "The helicopter has touched the ground and the player isn't in the helo."; //do some things waitUntil {isTouchingGround theHelo && {! (player in theHelo) && {isTouchingGround player}}}; hint "The helicopter has touched the ground, the player isn't in the helo and the player isn't in a parachute."; //do some things waitUntil {(getPosATL theHelo) select 2 < 2 && {! (player in theHelo) && {(getPosATL player) select 2 < 2}}}; hint "The helicopter is near the ground, the player isn't in the helo and the player probably isn't in a parachute."; //do some things Of course you can use 'IF' control structure if you want. Edited December 7, 2013 by Iceman77 1 Share this post Link to post Share on other sites
dragonsyr 21 Posted December 8, 2013 thank you Iceman , you r very helpful Share this post Link to post Share on other sites
Andy16823 1 Posted February 11, 2022 Thanks for all the help got it done. You will find the script bellow in case some else needs something like this as well. private _tObject = _this select 0; _tObject addAction["Transport to", { params ["_target", "_caller", "_actionId", "_arguments"]; // Save starting vector _oldPos = position _target; openMap true; hint "Select on the map the designated position"; // Set landing zone! _target onMapSingleClick { deleteMarker "LandingPosition"; _heloWaypoint = createMarker ["LandingPosition", _pos]; _heloWaypoint setMarkerShape "ICON"; _heloWaypoint setMarkerType "hd_pickup"; _this doMove getMarkerPos "LandingPosition"; openMap false; onMapSingleClick ""; hintSilent ""; }; // Wait until the helicopter reachs the landing point. If he reachs the point he stops and land waitUntil { _cPos = position _target; _meters = _cPos distance2D getMarkerPos "LandingPosition"; if (_meters < 100) then { hint "landing soon!"; true; } else { hint str _meters; false; }; }; doStop _target; _target land "GET OUT"; // Wait until the helicopter landed waitUntil { isTouchingGround _target; }; hint "Helicopter is landet!"; // Wait 30 seconds and fly back to base _sec = 0; waitUntil { sleep 1; _sec = _sec + 1; if(_sec >= 30) then{ true; } else { false; } }; _this doMove _oldPos; hint "Helicopter is flying back!"; // Wait until the heli reachs his starting position and land waitUntil { _cPos = position _target; _meters = _cPos distance2D _oldPos; if (_meters < 100) then { true; } else { hint str _meters; false; }; }; doStop _target; _target land "GET OUT"; // wait until he is touching the ground and shut down the engine waitUntil { isTouchingGround _target; }; _target engineOn false; }, [_tObject]]; and it get called inside the editor with this function [this, airport_military_transport_pilot_1] execVM "scripts\transport.sqf"; Share this post Link to post Share on other sites