ironhawx 15 Posted December 4, 2013 Ok when I googled this I got a post that wasn't activate in over 160 days so per the warning I figured I'd ask in a new thread. What I was searching for (and failed to find) was aside from a script to allow the doors to be operated on the GhostHawk to be make it to where only the pilot/copilot could open them and if by reading their states be able to deny entry into it if the doors were closed. Any help or info if its even possible would be greatly appreciated. Share this post Link to post Share on other sites
Mattar_Tharkari 10 Posted December 5, 2013 (edited) /*Script for "B_Heli_Transport_01_F" - "UH-80 Ghost Hawk" allows only pilot/ copilot to operate doors, locks cargo if doors closed. usage: _hdl = [this] execVM "heliDoors.sqf"; _hdl = [heliName] execVM "heliDoors.sqf"; */ _vcl = _this select 0; {_vcl animateDoor [_x, 1];} forEach ["door_L","door_R"]; _vcl addAction ["<t color='#FF0000'>[Open Doors]</t>", { {(_this select 0) animateDoor [_x, 1];} forEach ["door_L","door_R"]; (_this select 0) lockCargo false; },"",0.1,false,true,"","(driver _target == _this || _target turretUnit [0] == _this) && ((_target doorPhase 'door_R') < 1)"]; _vcl addAction ["<t color='#FF0000'>[Close Doors]</t>", { {(_this select 0) animateDoor [_x, 0];} forEach ["door_L","door_R"]; (_this select 0) lockCargo true; },"",0.1,false,true,"","(driver _target == _this || _target turretUnit [0] == _this) && ((_target doorPhase 'door_R') > 0)"]; Edited December 5, 2013 by Mattar_Tharkari Share this post Link to post Share on other sites
ironhawx 15 Posted December 5, 2013 Ok so where would I put this code, would I make an sqf file and copy and past it in, and then have the chopper call it in its init? Share this post Link to post Share on other sites
Mattar_Tharkari 10 Posted December 5, 2013 (edited) If you want to test it put this in an empty heli init field and copy the script into an sqf: _hdl = [this] execVM "heliDoors.sqf"; Edited December 5, 2013 by Mattar_Tharkari Share this post Link to post Share on other sites
ironhawx 15 Posted December 5, 2013 The door animation all works, idk if it will deny entry or not when doors are closed wasn't able to test it as its just me working on mission right now, much thanks for the doors, and will be able to test entry part tonight and will let you know. Thanks for all your help good sir. Share this post Link to post Share on other sites
armatoday 12 Posted August 26, 2016 so old post but it is still working script. on the other hand, it is not working on Dedicated Server and after respawn. any idea about how to modify? thanks in advance. Share this post Link to post Share on other sites