Page tree
Skip to end of metadata
Go to start of metadata

Introduced in




Synchronizes animations involving more than one unit, and allows to specify a position and direction to play an animation at.

Note: The function does not work with child or animal actors.

Whether an animation requires one or two actors depends on the animation definition. If it designed for two actors, it normally names the code "_complex_" in its name, but it can also be checked by evaluating its "complexAnimConnectTo" property. For example:

_anim = "AmovPercMstpSnonWnonDnon_SmokingTalkingCasual_v1_complex_1";
if (getText (configFile>>"CfgMovesMaleSdr">>"States">>_anim>>"complexAnimConnectTo")!="") then {
  hint format["'%1' requires 2 actors",_anim];


Syntax:[unit1, unit2, animation, position, direction] call fn_vbs_complex_animation
  • unit1: Object - Primary (or only) actor. Can be a player.
  • unit2: Object - Secondary actor (optional), unit2 moves to the position relative to unit1 that is required for the defined animation. Can only be AI.
  • animation: String - Name of Animations to play.
  • position: Position-2 - Location to play the animation at (optional).
    If not in proximity to the unit, the actors first move towards it.
    If no position is specified, then the animation is played at the current position of unit1.
  • direction: Number - Direction unit1 should point in, when starting the animation (optional).
    If none is given, the the current direction is used.
    If position is specified, then direction should also be given.
Return Value:Boolean - If true, then animation was performed successfully; if false, then an error occurred.


When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Functions A-Z.


Plays a single-actor animation at [2000,2000], starting out pointed east:
[soldierOne,"AmovPercMstpSnonWnonDnon_CheckSix_v1",[2000,2000],90] call fn_vbs_complex_animation
Civ2 will move towards Civ1, and shake hands with each other:
[Civ1, Civ2, "AmovPercMstpSnonWnonDnon_handshake_v1_complex_1"] call fn_vbs_complex_animation

Additional Information

See also: fn vbs animation active, fn vbs animation status, playMove, switchMove, Animations