{"name":"BIS_fnc_destroyer01OperateHangarDoors","operator":null,"title":"BIS fnc destroyer01OperateHangarDoors","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_destroyer01OperateHangarDoors","revid":364795,"updated":"2024-06-13T20:08:17Z","groups":["Destroyer"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.84"}],"since":{"game":"arma3","name":"Arma 3","version":"1.84"},"arma3_since":"1.84","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"This function is designed to handle animations of ship hangar doors from vehicle user action (see #Examples).\nIt calls BIS_fnc_destroyer01AnimateHangarDoors.\n\n> [!IMPORTANT]\n> Object (ship) must have all animations correctly defined and user actions configured.","syntaxes":[{"syntax":"[shipPart, doorState] call BIS_fnc_destroyer01OperateHangarDoors","since":null,"effect":null,"exec":null,"params":[{"name":"shipPart","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"shipPart: Object"},{"name":"doorState","type":"Number","optional":false,"default":null,"description":"doors' animation state; 1 to open, 0 to close","types":["Number"],"since":null,"text":"doorState: Number - doors' animation state; 1 to open, 0 to close"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"}}],"examples":[{"text":"```sqf\n[this, 1] call BIS_fnc_destroyer01OperateHangarDoors; // to open doors\n[this, 0] call BIS_fnc_destroyer01OperateHangarDoors; // to close doors\n```\n\n```cpp\nclass OpenHangarDoor_1\n{\n    displayNameDefault        = \"<img image='\\A3\\Ui_f\\data\\IGUI\\Cfg\\Actions\\open_door_ca.paa' size='2.5' />\";\n    displayName             = \"$STR_DN_OUT_O_DOOR\";\n    position                 = \"pos_Door_Hangar_1_Trigger\";\n    priority                 = 0.4;\n    radius                     = 1.5;\n    onlyForPlayer             = 0;\n    condition                 = \"(((nearestObjects [this, ['Land_Destroyer_01_hull_04_F'], 50, false]) select 0) animationPhase 'Door_Hangar_1_1_open') < 0.1;\";\n    statement                 = \"[this, 1] call BIS_fnc_destroyer01OperateHangarDoors;\";\n};\n\nclass CloseHangarDoor_1 : OpenHangarDoor_1\n{\n    displayName             = \"$STR_DN_OUT_C_DOOR\";\n    position                 = \"pos_Door_Hangar_1_Trigger\";\n    condition                 = \"(((nearestObjects [this, ['Land_Destroyer_01_hull_04_F'], 50, false]) select 0) animationPhase 'Door_Hangar_1_1_open') >= 0.1;\";\n    statement                 = \"[this, 0] call BIS_fnc_destroyer01OperateHangarDoors;\";\n};\n```","code":["[this, 1] call BIS_fnc_destroyer01OperateHangarDoors; // to open doors\n[this, 0] call BIS_fnc_destroyer01OperateHangarDoors; // to close doors"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_destroyer01AnimateHangarDoors"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Destroyer","Functions","Introduced with Arma 3 version 1.84"],"docblock":null,"filled_from_docblock":[]}