Jump to content
Sign in to follow this  
ironhawx

Ghost Hawk Door Animation/Functionality

Recommended Posts

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
/*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 by Mattar_Tharkari

Share this post


Link to post
Share on other sites

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

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 by Mattar_Tharkari

Share this post


Link to post
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×