{"name":"animationPhase","operator":null,"title":"animationPhase","type":"command","url":"https://community.bistudio.com/wiki/animationPhase","revid":379102,"updated":"2026-10-03T12:06:54Z","groups":["Animations"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.75"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.75"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns the phase of the given animation on the given object. Animation can be scripted (animate, animateSource, animateDoor) or engine driven. Animation names for an object could be found out with animationNames command. When animation is rotation, like with \"MainTurret\" for example, the output is in radians, to convert to degrees use deg command.\n\n> [!NOTE]\n> Since Arma 3 v2.24 parachutes are supported. The phases for a parachute animation are: 0...1 - pulling of the parachute from the bag, 1...2 - opening of the canopy, 2...3 packing of the canopy. The animation name is \"\". \n>\n> ```sqf\n> _para animationPhase \"\"; // current animation phase\n> ```\n>\n>  See also animate","syntaxes":[{"syntax":"object animationPhase animationName","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":"animationName","type":"String","optional":false,"default":null,"description":"name of the animation. This is the class-name of the animation defined in the addon's config.cpp","types":["String"],"since":null,"text":"animationName: String - name of the animation. This is the class-name of the animation defined in the addon's config.cpp"}],"returns":{"type":"Number in range 0..1","types":["Number"],"description":"where 0 is the start point of the animation and 0 is the end point","text":"Number in range 0..1 - where 0 is the start point of the animation and 0 is the end point"},"form":"binary","operator":null,"left":{"text":"object","types":["Object"]},"right":{"text":"animationName","types":["String"]}}],"examples":[{"text":"```sqf\n_building animate [\"maindoor\",1];\nsleep 1;\n_p = _building animationPhase \"maindoor\";// Returns 1, if the animation speed is two seconds\n```","code":["_building animate [\"maindoor\",1];\nsleep 1;\n_p = _building animationPhase \"maindoor\";// Returns 1, if the animation speed is two seconds"]},{"text":"```sqf\n_flagPole animationPhase \"flag\";\n```","code":["_flagPole animationPhase \"flag\";"]},{"text":"```sqf\n_tank animationPhase \"MainTurret\";\n```","code":["_tank animationPhase \"MainTurret\";"]}],"multiplayer":"In Operation Flashpoint, on dedicated servers, *animationPhase* will always return 0, no matter what the actual phase is.","problems":null,"aliases":[],"see_also":["animate","moveTime","setFaceAnimation","animateDoor","doorPhase","animateSource","animationSourcePhase","animationNames"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Animations","Introduced with Operation Flashpoint version 1.75","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}