Maurdekye 10 Posted August 25, 2014 I've tried lots of ways, but no matter what do I just can't seem to get a proper heli extraction to work. Basically, I have a trigger, a helipad and a character. I want a helicopter to be hovering in the distance, and I want it to land on the helipad when the trigger is pulled. I want it to wait until the player character is inside the helicopter before it takes off again. I then want it to fly to another waypoint, where the mission will end when the helicopter reaches it. I've made the first waypoint a LAND waypoint and a second one a MOVE waypoint. I've put this code in the ON ACT of the MOVE waypoint; endMission "END1"; and put this code inside the CONDITION of the MOVE waypoint; player in extractheli I've also synced the LAND waypoint with the trigger. When I try this, the heli will hover in the air until the trigger is pulled, at which point it immediately moves past the first waypoint and to the second one. I'm not sure what to do about this. Share this post Link to post Share on other sites
alky_lee 279 Posted August 25, 2014 Here is a link to a simple heli insert/extraction tutorial. Just remember to place an invisible helipad where you want the heli to land. If you search this forum, there are more complex scripts where the heli will land on smoke instead. (Useful if you don't have a fixed extraction point) Share this post Link to post Share on other sites
Maurdekye 10 Posted August 25, 2014 (edited) I've done everything exactly as in the video, but to no effect. If someone could explain how to make an extraction and NOT point me to a video or another forum post, i'd be very grateful. Edited August 25, 2014 by Maurdekye Share this post Link to post Share on other sites
COL.C.T 11 Posted August 26, 2014 (edited) Alright, what you're going to do is plant three things. You (named unit1), a chopper (named helicopter1) and an invisible helipad. You're going to want to place a waypoint right on top of the chopper. Now, go place the trigger, and sync it to the waypoint. This will basically force the chopper to wait at that waypoint until it is activated via the trigger. You're going to want to place the second waypoint, the LAND waypoint, onto the invisible helipad. Inside that waypoint's activation field, put this down. dostop Helicopter;Helicopter land "get in" This forces the chopper to land, and keep it's engine running. Now, create a third waypoint for the chopper practically under the second, and in the condition field, put this down. ((!alive unit1) OR (unit1 in helicopter)) This forces the chopper to identify whether or not you (unit1) is present in it, and if you have multiple troops boarding it, simply give them extra soldiers names and repeat that last code by putting AND (for example: ((!alive unit1) OR (unit1 in helicopter)) AND ((!alive unit2) OR (unit2 in helicopter)) ... Create the fourth waypoint where ever the chopper is going to go. EDIT: Oh, forgot :p if this is happening under enemy fire, set the chopper to careless at the first waypoint, that should do the trick. Edited August 26, 2014 by COL.C.T forgot to add something 1 Share this post Link to post Share on other sites
Maurdekye 10 Posted August 26, 2014 Thank you, that helps a whole lot. Share this post Link to post Share on other sites
Maurdekye 10 Posted August 26, 2014 (edited) I tried putting this code in, however the helicopter will stay hovering in the air when the task is completed. Here is an example mission I made to try and demonstrate this, which does not work even though it should; https://dl.dropboxusercontent.com/u/102121091/Helicopter_Extraction_Test.VR.7z ---------- Post added at 23:24 ---------- Previous post was at 22:56 ---------- Bump. Edited August 26, 2014 by Maurdekye Share this post Link to post Share on other sites
COL.C.T 11 Posted August 27, 2014 I derped. I meant LOAD waypoint, not LAND. Also, you should move that last waypoint for the chopper a bit farther away, so it won't activate when you get in (Choppers have a habit of activating waypoints when 50m or less from them. Share this post Link to post Share on other sites
wiggum2 31 Posted August 27, 2014 Maybe this helps you, here is my helicopter extraction script i use in my missions: if (!isServer) exitwith {}; private ["_group","_heli","_side","_spawnPos","_goToPos","_AirPos","_safePos","_range","_maxGrad","_landPos","_m","_vehicle","_veh","_vehgrp","_x","_wp1","_smokePos","_smoke","_wp2","_units","_strobe","_light"]; //_group = _this select 0; _heli = _this select 0; _side = _this select 1; _spawnPos = _this select 2; _goToPos = _this select 3; waituntil {!isnil "bis_fnc_init"}; _AirPos = [(getmarkerpos _spawnPos select 0), (getmarkerpos _spawnPos select 1), 100]; //find safe landing position _safePos = []; _range = 35; _maxGrad = 0.1; while {((count _safePos) == 0)} do { _safePos = [ ["position", getMarkerPos "lz"], ["number", 1], ["objDistance", 9], ["range", [0, _range]], ["maxGradient", _maxGrad] ] call RUBE_randomCirclePositions; _range = _range * 1.25; _maxGrad = _maxGrad + 0.01; }; _landPos = createVehicle ["Land_HelipadEmpty_F", (_safePos select 0), [], 0, "NONE"]; /*_m = createMarker ["exma", position _landPos]; _m setMarkerShape "Icon"; _m setMarkerType "mil_pickup"; _m setmarkerColor "ColorWEST"; _m setMarkerText "EXTRACTION";*/ //hint format ["%1", _safePos]; [["RadioAmbient5"], "sh_sound_fnc", nil, false] call BIS_fnc_MP; _vehicle = [_AirPos, random 360, _heli, _side] call bis_fnc_spawnvehicle; _veh = _vehicle select 0; _vehgrp = _vehicle select 2; _veh setVehicleVarName "she_heli"; she_heli = _veh; _veh setposATL [(getPosATL _veh) select 0, (getPosATL _veh) select 1, 50]; _veh flyInHeight 50; {_x setBehaviour "STEALTH"; _x setCombatMode "BLUE"; _x allowFleeing 0; _x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x disableAI "FSM";} foreach units _vehgrp; [[_veh], "sh_fnc", nil, true] call BIS_fnc_MP; clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; _wp1 = _vehgrp addWaypoint [position _landPos, 0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointSpeed "NORMAL"; _wp1 setWaypointCompletionRadius 5; _wp1 setWaypointStatements ["true", "she_heli land 'GET OUT';{she_heli animateDoor [_x, 1]} forEach ['door_back_L','door_back_R','door_L','door_R']"]; sleep 1; //Smoke or IR Strobe waitUntil { (_veh distance _landPos) < 350 }; _smokePos = [getPos _landPos, 10, 25, 1, 0, 60 * (pi / 180), 0] call BIS_fnc_findSafePos; _smoke = createVehicle ["SmokeShellYellow", _smokePos, [], 0, "NONE"]; // _smoke = createVehicle ["SmokeShell", _smokePos, [], 0, "NONE"]; // _light = createVehicle ["Chemlight_yellow", _smokePos, [], 0, "NONE"]; // _strobe = createVehicle ["I_IRStrobe", position _smokePos, [], 0, "NONE"]; _units = [] call BIS_fnc_listPlayers; sleep 0.1; //Wait until everyone is onboard waitUntil { {alive _x && _x in she_heli} count _units == count ([] call BIS_fnc_listPlayers) }; {_veh animateDoor [_x, 0]} forEach ["door_back_L","door_back_R","door_L","door_R"]; _veh lock true; _wp2 = _vehgrp addWaypoint [getmarkerpos _goToPos, 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointSpeed "NORMAL"; _wp2 setWaypointCompletionRadius 5; /*deleteMarker "exma";*/ //Outo Variable waitUntil { ([position _veh select 0,position _veh select 1,0] distance _landPos) > 100 }; sh_Outro = true; publicvariable "sh_Outro"; 1 Share this post Link to post Share on other sites
Maurdekye 10 Posted August 27, 2014 (edited) Thank you COL.C.T, that fixed it! Although I don't understand why the land waypoint and the waypoint that checks if the crew has entered have to be separate. Edited August 27, 2014 by Maurdekye Share this post Link to post Share on other sites
COL.C.T 11 Posted August 27, 2014 Eh, that's how ARMA works :cool: Share this post Link to post Share on other sites
Normal Norm 19 Posted April 18, 2016 Alright, what you're going to do is plant three things. You (named unit1), a chopper (named helicopter1) and an invisible helipad. You're going to want to place a waypoint right on top of the chopper. Now, go place the trigger, and sync it to the waypoint. This will basically force the chopper to wait at that waypoint until it is activated via the trigger. You're going to want to place the second waypoint, the LAND waypoint, onto the invisible helipad. Inside that waypoint's activation field, put this down. dostop Helicopter;Helicopter land "get in" This forces the chopper to land, and keep it's engine running. Now, create a third waypoint for the chopper practically under the second, and in the condition field, put this down. ((!alive unit1) OR (unit1 in helicopter)) This forces the chopper to identify whether or not you (unit1) is present in it, and if you have multiple troops boarding it, simply give them extra soldiers names and repeat that last code by putting AND (for example: ((!alive unit1) OR (unit1 in helicopter)) AND ((!alive unit2) OR (unit2 in helicopter)) ... Create the fourth waypoint where ever the chopper is going to go. EDIT: Oh, forgot :P if this is happening under enemy fire, set the chopper to careless at the first waypoint, that should do the trick. Does anybody know how to make this work in the Eden editor. This works fine for me in the 2d editor but when I try it in Eden (its my preferred type editor) I cannot get it to work. I think the problem stems from the trigger in the Eden editor not having a switch option in it. Ive tried many different ways and looked at many different videos but I cannot get it to work in Eden. I really don't wanna use 2d unless I really have too. Any help would be appreciated. Share this post Link to post Share on other sites
TyrDaishi 2 Posted April 18, 2016 You might want to try this: https://forums.bistudio.com/topic/164617-extraction-example/Definatly the best script out there, you can order for evac over radio by simple call for it or combine it by poping some smoke nearby or ir strobe. You can control the area where the chopper lands, set some nice variables for the chopper including safe landing positions choosen by algorithm. If setup correctly, it works 100 % reliable for me. You can even choose different helicopters for different sides. Share this post Link to post Share on other sites
HaggisRoll 1 Posted September 13, 2016 Hi Guys. Not one for making new posts about stuff thats been done time and time again. But have a question regarding the heli extraction in the Eden Editor. I recently made a mission where the heli would come in and extract players when trigger set off. All works fine, Except when the heli lands it wont take off even though all players are in the heli. I used the !alive unit1 or unit in heli1 and !alive unit2 or unit 2 in heli1 script. I made this up to unit 8. But i think my problem is i only had 6 players playing the mission at the time so therefor the script would not fire due to 2 players not present in the game. Is there a way i can modify this to count playable units first. Thanks in advance Share this post Link to post Share on other sites
R3vo 2654 Posted September 13, 2016 ( {alive _x } count allPlayer ) isEqualTo ( {_x in heli} count allPlayers ) Not tested but could work. In theory it should compare the number of alive player with the number of player which are in your heli. If both are the same, the heli will take off. Share this post Link to post Share on other sites
HaggisRoll 1 Posted September 14, 2016 Thanks for reply. I'll give this a go this evening after work. Suppose in theory it should be like the escape from tanoa heli evac, however sometimes that can be painful if not every player is at the evac point when heli comes in. Thanks again for the help. will post back on my results. Share this post Link to post Share on other sites
Grumpy Old Man 3548 Posted September 14, 2016 There's also the transport module. Cheers Share this post Link to post Share on other sites
HaggisRoll 1 Posted September 15, 2016 There's also the transport module. Cheers Thanks for the info here. However i would like to try and get the extraction hands free so to speak. So only activated by making it to a certain point specified on the map. Share this post Link to post Share on other sites
Tajin 349 Posted September 15, 2016 I wish I'd get a penny for every time someone asked about helicopter transportation/extraction. I believe that this is the #1 most frequent question. In fact I even remember it beeing asked alot, back in OFP. :plain: Of course the answers have changed slightly back then but the basics remain the same. Waypoints here, optional invisible helipad there, yalla yalla... Share this post Link to post Share on other sites
HaggisRoll 1 Posted September 15, 2016 ( {alive _x } count allPlayer ) isEqualTo ( {_x in heli} count allPlayers ) Not tested but could work. In theory it should compare the number of alive player with the number of player which are in your heli. If both are the same, the heli will take off. Still cant get this to run for me. Changed the above to: ( {alive _x } count allPlayers ) isEqualTo ( {_x in evac} count allPlayers ) but the Heli just sits there and wont move to the waypoint with the condition in it. I know i could just set it up as a radio call-in using support requester, or putting it on a timed landing which is easy enough, however i like the fact that heli wil be called in by setting off a trigger which means its up to the team to protect it at the lz. Am i missing something? Share this post Link to post Share on other sites
Tajin 349 Posted September 15, 2016 Am i missing something? Yes, theres a typo in the first allPlayers Personally, I'd rather use this: (allPlayers select {alive _x}) isEqualTo (allPlayers select {(alive _x) && (vehicle _x isEqualTo heli)}) Grumpys condition didn't check if the players in the heli are alive. So if someone gets shot after entering the heli, it'll get stuck. Share this post Link to post Share on other sites
HaggisRoll 1 Posted September 15, 2016 Yes, theres a typo in the first allPlayers Personally, I'd rather use this: (allPlayers select {alive _x}) isEqualTo (allPlayers select {(alive _x) && (vehicle _x isEqualTo heli)}) Grumpys condition didn't check if the players in the heli are alive. So if someone gets shot after entering the heli, it'll get stuck. Thanks. I'll try this one tonight. I actually got it working from trawling Google, the Forums and YouTube. The the next waypoint after the land wp, i set it up on a trigger which in the condition field i have "({alive _x;} count (units group1) == {_x in evac;} count (units group1))" Tried it and tried it and it works fine. Shot a few of my group also to see if the heli still takes off and it does without issue's. Delighted it works, but i will try yours also. Thanks for help. Share this post Link to post Share on other sites