{"name":"BIS_fnc_destroyer01PlayHangarDoorSound","title":"BIS fnc destroyer01PlayHangarDoorSound","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_destroyer01PlayHangarDoorSound","revid":379558,"updated":"2026-10-31T13:49:42Z","groups":["Destroyer"],"status":"ok","games":{"arma3":"1.84"},"since":"arma3 1.84","arma3_since":"1.84","locality":{"effect":"global"},"exec":"spawn","description":"Plays the sounds of the destroyer's moving hangar doors with playSound3D (volume 5, audible up to 15 m):\n\n1. a slam sound (`A3\\sounds_f\\structures\\doors\\servoramp\\servorampslam.wss`)\n1. one second later, the servo sound (`A3\\sounds_f\\structures\\doors\\servoramp\\servorampsound_2.wss`)\n1. the slam sound again once the part's `Door_Hangar_1_1_open` animation phase equals the target phase.\n\nThe function is spawned by BIS_fnc_destroyer01AnimateHangarDoors when the doors are animated smoothly; it is meant for internal use.","syntaxes":[{"syntax":"[shipPart, position, phase] spawn BIS_fnc_destroyer01PlayHangarDoorSound","params":[{"name":"shipPart","type":"Object","description":"the ship part whose hangar doors move; it is the sound source and its animation phase is watched","type_expr":"Object"},{"name":"position","type":"Array format PositionASL","optional":true,"default":"[0,0,0]","description":"where the sounds are played","type_expr":"PositionASL","types":["Array","PositionASL"],"text":"position: Array format PositionASL - (Optional, default [0,0,0]) where the sounds are played"},{"name":"phase","type":"Number","optional":true,"default":"0","description":"target phase of the doors; the last sound plays when `Door_Hangar_1_1_open` reaches it","type_expr":"Number","text":"phase: Number - (Optional, default 0) target phase of the doors; the last sound plays when `Door_Hangar_1_1_open` reaches it"}],"returns":{"type":"Nothing","type_expr":"Nothing"}}],"examples":[{"text":"How BIS_fnc_destroyer01AnimateHangarDoors uses it:\n\n```sqf\nprivate _soundPos = _shipPart modelToWorldWorld (_shipPart selectionPosition \"Door_Hangar_SoundPos\");\n[_shipPart, _soundPos, _animationState] spawn BIS_fnc_destroyer01PlayHangarDoorSound;\n```","code":["private _soundPos = _shipPart modelToWorldWorld (_shipPart selectionPosition \"Door_Hangar_SoundPos\");\n[_shipPart, _soundPos, _animationState] spawn BIS_fnc_destroyer01PlayHangarDoorSound;"]}],"see_also":["BIS_fnc_destroyer01AnimateHangarDoors","BIS_fnc_destroyer01OperateHangarDoors","playSound3D"]}