{"name":"animationSourcePhase","operator":null,"title":"animationSourcePhase","type":"command","url":"https://community.bistudio.com/wiki/animationSourcePhase","revid":336879,"updated":"2023-01-04T16:43:50Z","groups":["Animations"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.58"}],"since":{"game":"arma3","name":"Arma 3","version":"1.58"},"arma3_since":"1.58","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns current animation phase of given source. Similar to animationPhase or doorPhase but designed to complement animateSource. This command could be used to obtain relative turret direction and gun elevation on a vehicle (see #Example 2).","syntaxes":[{"syntax":"object animationSourcePhase source","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"object: Object"},{"name":"source","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"source: String"}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"},"form":"binary","operator":null,"left":{"text":"object","types":["Object"]},"right":{"text":"source","types":["String"]}}],"examples":[{"text":"```sqf\nprivate _phase = house animationSourcePhase \"Door_1_source\";\n```","code":["private _phase = house animationSourcePhase \"Door_1_source\";"]},{"text":"```sqf\nprivate _mainturretDirection =    deg (_marshall animationSourcePhase \"mainturret\"); // relative to Marshall direction\nprivate _maingunElevation =        deg (_marshall animationSourcePhase \"maingun\");\nprivate _obsturretDirection =    deg (_marshall animationSourcePhase \"obsturret\"); // relative to main turret direction\nprivate _obsgunElevation =        deg (_marshall animationSourcePhase \"obsgun\");\n```","code":["private _mainturretDirection =\tdeg (_marshall animationSourcePhase \"mainturret\"); // relative to Marshall direction\nprivate _maingunElevation =\t\tdeg (_marshall animationSourcePhase \"maingun\");\nprivate _obsturretDirection =\tdeg (_marshall animationSourcePhase \"obsturret\"); // relative to main turret direction\nprivate _obsgunElevation =\t\tdeg (_marshall animationSourcePhase \"obsgun\");"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["animateSource","animationNames","animate","animationPhase","animateDoor","doorPhase"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Animations","Introduced with Arma 3 version 1.58","Scripting Commands"]}