Cooperative Animations System

This system is not maintained since SDK release 3.5

Animation synchronization between several characters is currently achieved by using CryMannequin.

Cooperative Animations System

This Document explains the Coop Anim System and demonstrates the process of setting up a cooperative animation on two characters using the FlowGraph.

The Cooperative System

What does it do?

The Cooperative Animation System allows the aligning of multiple characters to each other and synchronously start animations on them. This is specifically helpful when characters have to interact with each other and their positioning needs to be exact, for example for melee moves or cooperative climbing, etc.

Multiple Characters

From CryENGINE version 3.2.0 and up the cooperative system will contain interfaces to directly set up an arbitrary amount of characters; versions before can handle these characters too, but there are only interfaces to set up two characters. This version will also contain an extended FlowGraph node to set up to 4 characters. This node can be extended to any amount of characters needed in code.

Character Alignment

All characters are pushed into position at the beginning of the animation and the animations are started at the same time so that the movement covers up the sliding. The relative positions of the characters are read out from the assets directly (they need to be exported from the same MAX scene).

There are several possibilities to align the characters to each other. The Coop System supports the following four methods:

1. Wild Match
This aligns the characters so that everyone involved has to move/rotate the least amount. Very useful for melee moves.

2. FirstActor
This will keep the master actor in place, but he can rotate. This is for example useful if the player character should not move, for example for backstabbing attacks if the player is set to be the master/first actor.

3. FirstActorNoRot
This will keep the master completely in place, no rotation allowed even. Useful if that person absolutely should not move or slide, but requires all other characters involved to move bigger distances around him to get into position.

4. FirstActorPosition
This will allow to specify a position and rotation for the first actor. This is useful when the animations have to interact with the environment, for example climbing up rocks, ledges or puling levers etc...

Asset Movement Limitations (only applicable for versions before 3.2.1)
Since the Movement Control method during the animation is Animation-driven, but the characters need to be pushed into position, note that the animations can not have locator movement during the duration of the slide. As a general rule it is advised to reduce all locator movement to the last few frames of the animation. The characters are allowed to move away from the locator, however, so this technical requirement does not limit the characters movement or the animator's freedom to move the characters. CryENGINE versions 3.2.1 and up do not have this limitation any more.

The FlowGraph Node

This little tutorial will demonstrate the use of the Coop Animation FlowGraph node in a level. It uses a Proximity Trigger to start the animation.

Multiple Characters

The pictures below show the FG node from before CryENGINE version 3.1.6, which only allowed to set up two characters although the coop system can handle an arbitrary amount.

Example: Setting Up a Melee Kill Move

Open the editor and load a level or create a new one. Place a Civilian entity in the level and assign it the SDK character model.

Open an existing FlowGraph or create a new one (for example by selecting the newly created Civilian entity and choosing Create from the FlowGraph tab in the properties.

Create a Proximity Trigger from the Entities Tab and place it in the level. Position it at the feet of the Civilian and adjust it's size, so that it is about 30 cm around the character.

Select the Civilian entity and place it in the FlowGraph (select Civilian, right click into FlowGraph and choose "Add Selected Entity". Do the same with the Proximity Tigger, so that both are present in the FlowGraph.

In the FlowGraph, open the Animations Tab and drag and drop a CooperativeAnimation Node inside the view. Assign animations to it, choose either your own animations, or select from the Character editor. For this demonstration, use coop_melee_beat_pistol_01 for the master (AnimationName_01) and coop_melee_getBeat_pistol_01 for the secondary character.

Leave all the other settings as they are, they are not needed for this demonstration.

Connect the "Enter" output port of the Proximity trigger to the "Start" input of the Cooperative Animation. This will start the animations as soon as the player enters the Proximity Trigger's volume.

Before this works the Coop Node needs to know the entity id's of the two characters the animations are supposed to be played upon, and which one of them is the first (master) and who is the secondary actor.

For the player select the "Game" Tab and place the "LocalPlayer" node in the view. This will supply the player's entity ID during the game. For the civilian choose the "Entity" Tab and drag and drop the "EntityId" node in the view and assign the Civilian to it.

Connect the entity IDs to the CooperativeAnimation node. As a last step, the Civilian is supposed to die after the melee animation has finished. To achieve this, connect the "Finished_02" output port to the "Kill" input on the Civilian's entity node. The animations for both characters might have different lengths. The Finished outputs ports could be triggered at different times for each.

The final FlowGraph node setup should look like this:

Jump in game and run up against the Civilian character.