samir17864 44 Posted August 4, 2023 Hi everyone, I am trying to use an event handler for MQ-12 Falcon drone helicopter to be triggered when it land (touchdown) ... It seems these 2 event handlers are not working with this UAV (LandedTouchDown , LandedStopped) .. I don't want to use isTouchingGround function. Is there a solution ?? Share this post Link to post Share on other sites
pierremgi 4898 Posted August 4, 2023 Right. These EHs are for planes only (not helicopter). You can use isUAVConnected command, for example.. or UAVControl . Not sure is what you need. Share this post Link to post Share on other sites
samir17864 44 Posted August 4, 2023 We all know the problem of UAV drones when the UAV terminal operator give a landing order and the drone land by auto-pilot. After landing and the drone come to full stop, it will not respond to the UAV terminal operator once again ... I solved this problem using this code: [] spawn { while { true } do { { if ( isNil { _x getVariable "L_S_EH" } ) then { _x setVariable [ "L_S_EH", _x addEventHandler ["LandedStopped", { _UAVplane = _this select 0; player connectTerminalToUAV objNull; deleteVehicleCrew _UAVplane; createVehicleCrew _UAVplane;}] ]; }; } count (player nearEntities ["UAV", 15000]); }; }; The solution is simple: deleting the drone crew and create it once again will reset the drone and hence it will respond again normally to the UAV terminal operator. The above code work nice on GreyHawk drones. I tried this code with one GreyHawk drone 4 times and it works great: fly >>> shoot targets >>> auto-land >>> rearm >>> fly >>> shoot targets >>> auto-land >>> rearm >>> fly >>> shoot targets >>> auto-land >>> rearm >>> fly >>> shoot targets >>> auto-land But the above code does not work for MQ-12 Falcon helicopter drones, because LandedTouchDown , LandedStopped eventhandlers will not triggeer. Any suggestion? By the way, using player connectTerminalToUAV objNull; is important, because if the drone comes to full stop and the crew are deleted while the player in camera view, then the player will not be able to get back to the normal player view. So the above code will make sure that the player is disconnected from the drone and force get back to normal player view. Share this post Link to post Share on other sites
pierremgi 4898 Posted August 5, 2023 9 hours ago, samir17864 said: We all know the problem of UAV drones when the UAV terminal operator give a landing order and the drone land by auto-pilot. After landing and the drone come to full stop, it will not respond to the UAV terminal operator once again ... I solved this problem using this code: [] spawn { while { true } do { { if ( isNil { _x getVariable "L_S_EH" } ) then { _x setVariable [ "L_S_EH", _x addEventHandler ["LandedStopped", { _UAVplane = _this select 0; player connectTerminalToUAV objNull; deleteVehicleCrew _UAVplane; createVehicleCrew _UAVplane;}] ]; }; } count (player nearEntities ["UAV", 15000]); }; }; Any suggestion? Never land. I can't say how many issues come with UAV waiting on airport. There are also able to fire at enemies when disconnected, with fateful result. Your MQ-12 is bugged anyway: unable to land safely by a land waypoint. My workaround is to place UAV, far outside map, with disabled sim and hidden til connected, ready for mission, and when I disconnect, auto-return to start position, rearm, refuel, hidden and disabled sim. Share this post Link to post Share on other sites
samir17864 44 Posted August 5, 2023 Thank you @pierremgi, How to post images in here ?? insert other media is not accepting Dropbox links. Share this post Link to post Share on other sites