{"name":"animate","operator":null,"title":"animate","type":"command","url":"https://community.bistudio.com/wiki/animate","revid":379104,"updated":"2026-10-03T12:13:48Z","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":"global","server_exec":false},"exec":null,"description":"Activates given object animation. Animation is defined in CfgModels animations class. Class names listed in CfgVehicles AnimationSources bound to \"Proxy\" controller can also be animated with animate command (see Arma 3: createVehicle/vehicles).\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 \"\". You can only skip forward the animation of the parachute. For example: \n>\n> ```sqf\n> _para animate [\"\", 1]; // skips parachute animation forward to the canopy opening\n> ```\n>\n>  Giving negative phase would delay the whole parachute opening animation until the phase rolls up to 0. See also animationPhase\n\n> [!NOTE]\n> **Arma 3:** - It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimised for multiplayer\n> - Since Arma 3 v1.58 animation names can be obtained with animationNames\n\n> [!WARNING]\n> Mixing animateSource command with animate command to animate the same part may produce some undefined behaviour.","syntaxes":[{"syntax":"object animate [animationName, phase, speed]","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 config","types":["String"],"since":null,"text":"animationName: String - name of the animation. This is the class-name of the animation defined in the config"},{"name":"phase","type":"Number","optional":false,"default":null,"description":"range 0 (start point of the animation) to 1 (end point of the animation). The speed, in which the animation is processed, is defined in the addon's config.cpp and cannot be changed during running missions","types":["Number"],"since":null,"text":"phase: Number - range 0 (start point of the animation) to 1 (end point of the animation). The speed, in which the animation is processed, is defined in the addon's config.cpp and cannot be changed during running missions"},{"name":"speed","type":"Boolean or (since Arma 3 v1.66) Number","optional":true,"default":"false","description":"when true animation is instant; Number > 0 is treated as config speed value multiplier","types":["Boolean","Number"],"since":null,"text":"speed: Boolean or (since Arma 3 v1.66) Number - (Optional, default false) when true animation is instant; Number > 0 is treated as config speed value multiplier"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"object","types":["Object"]},"right":{"text":"[animationName, phase, speed]","types":["Array"]}}],"examples":[{"text":"```sqf\n_building animate [\"maindoor\", 1];\n```","code":["_building animate [\"maindoor\", 1];"]},{"text":"```sqf\n_building animate [\"Door_1_rot\", 1, true];\n```","code":["_building animate [\"Door_1_rot\", 1, true];"]},{"text":"Create Offroad and add flashing police light bar:\n\n```sqf\noffroad = \"C_Offroad_01_F\" createVehicle (player getRelPos [5, 0]);\noffroad animate [\"HidePolice\", 0];\noffroad animate [\"BeaconsStart\", 1];\n```","code":["offroad = \"C_Offroad_01_F\" createVehicle (player getRelPos [5, 0]);\noffroad animate [\"HidePolice\", 0];\noffroad animate [\"BeaconsStart\", 1];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["animationPhase","setFaceAnimation","animateSource","animationSourcePhase","animateDoor","doorPhase","animationNames"],"notes":[{"user":"Mikero","date":"2007-08-23T22:50:00Z","text":"Animations can be used on existing game models such as houses that have doors eg. The general syntax is\n\n```sqf\nhouse animate [\"dvere1\", 1]\n```\n\nto 'open' the door and \n\n```sqf\nhouse animate [\"dvere1\", 0]\n```\n\n to 'close' it. Whether used on Oem addons, or official ones, an internal working knowledge (via config.cpp) of the model's animated name(s) is required.\n\n'open' and 'close' are visual perceptions of the state of the model, and are a design decision of the p3d. Open does not, necessarily mean, 1, and close does not mean 0.\n\n'0' and '1' are better seen as FULLY_OFF and FULLY_ON\n\nIf a door is initially closed in the model, FULLY_ON, will open it. If it is initialy OPEN visually, in the model, FULLY_ON will close it.\n\n (in config cpp) does not alter open and close meanings, all it does is set the model to the 'on' (rather than 'off') state to begin with. Whether on means open or close visually is a p3d design decision."},{"user":"Tyger","date":"2008-12-06T08:23:00Z","text":"Also, to animate the object called \"Bar Gate\" in ArmA, use the following: \n\n```sqf\nmyGate animate [\"Bargate\",1]\n```\n\n to close it, and \n\n```sqf\nmyGate animate [\"Bargate\", 0]\n```\n\n to open it."},{"user":"RageBone","date":"2016-02-16T21:33:00Z","text":"\"Bargate\" was exchanged with \"Door_1_rot\" at one point:\n\n```sqf\nobject animate [\"Bargate\", 0]; // doesn't work\n```\n\n```sqf\nobject animate [\"Door_1_rot\", 0]; // works\n```"},{"user":"Killzone_Kid","date":"2016-03-14T00:34:00Z","text":"To animate bargate use animateSource:\n\n```sqf\nbargate animateSource [\"Door_1_source\", 1];\n```"},{"user":"SteveStevenson","date":"2017-11-25T20:55:00Z","text":"For pop-up targets, you can keep the target down (until you tell it to pop up) with:\n\n```sqf\ntarget1 animate [\"terc\", 1];\n```\n\nWhen you're ready for the target to pop up, you can use:\n\n```sqf\ntarget1 animate [\"terc\", 0];\n```\n\nWith this setting, the target will return to its usual behavior of going down when hit and automatically popping back up again. To make the target stay down after being hit, add the following line:\n\n```sqf\ntarget1 addEventHandler [\"HitPart\", { target1 animate [\"terc\", 1]; }];\n```"}],"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","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}