Legacy Reference

Using Tag State Keys

A tag state is a combination of tags from a tag definition. Tag states are represented by a list of tags separated by + characters. For example crouching+pistol defines a tag state combining the tags crouching and pistol.

A game can set global tags describing the current state of the character, or the global tag state. This typically contains global state information like character type, stance, and weapon attachment for example.

The global tag state is the tags member of the ActionController SAnimationContext, which is found with IActionController::GetContext().

Study the following numbered fragment timeline screen shots to understand the use of tag state keys:

  • Select the {kneeling+tired} tag state key.

  • Disable the tired tag in the key.

  • Note the tag state key changes to {kneeling]

The FragmentID (below the tag state key) selected is the default Idle{<default> - 0}. This fragment represents the best match for the game's request.

For the {kneeling+tired} tag state key, select the tired tag check box again.

Now drag the {kneeling+tired} tag state key to the right in the timeline.

This simulates a situation where the game requests {kneeling+tired} after requesting the Idle{<default> - o} fragmentID. This means that at the moment Idle is requested, the tags are not set, and the default FragmentID is selected.

The order in which game requests arrive in the Mannequin system has an influence on which fragments get selected eventually. For example, if you want to move a certain fragment around, you need to select both the FragmentID and the tag state key above it.