Menu
Lumberyard
Legacy Reference

Mannequin

The Mannequin component animates a component entity using the Mannequin System. This component works in conjunction with the Mannequin Scope Context component, which sets scope context. Using the mannequin scope context component is optional; as long as the appropriate scope context is set, the mannequin component functions as designed. The mannequin component simply acts as the programmer- and designer-facing interface for component entities with respect to mannequin.

To see how Lua scripting works with the Mannequin component, see Controllable Chicken sample project located at dev\SamplesProject\Levels\Component_Tests\Controllable_Chicken.

Mannequin Component Properties

The Mannequin component has the following property:

Controller Definition

Path to the controller definition file to be used for animation.

EBus Request Bus Interface (Per Fragment)

Use the following request functions with the EBus interface to communicate with other components of your game.

For more information, see Working with the Event Bus (EBus) System in the Amazon Lumberyard User Guide.

The following methods modify how a specific fragment on this component is played. Specific fragments are identified using a fragment ID (RequestId) that the QueueFragment method returns.

QueueFragment

Queues the indicated mannequin fragment.

Parameters

priority – Higher numbers indicate higher priority.

fragmentName – Name of the fragment to be played.

fragTags – Fragment tags to be applied (for multiple frag tags, use a + delimited list).

Return

RequestId – ID used to uniquely identify and make modifications to this request.

Scriptable

Yes

QueueFragmentById

Queues the indicated mannequin fragment.

Parameters

priority – Higher numbers indicate higher priority.

fragmentId – ID of the fragment to be played.

fragTags – Fragment tags to be applied (For multiple frag tags, use a + delimited list).

Return

RequestId – ID used to uniquely identify and make modifications to this request.

Scriptable

No

GetActionForRequestId

Allows users to retrieve the action associated with any given request ID.

Parameters

requestID – The request ID.

Return

Action – ID associated with a fragment request.

Scriptable

No

StopRequest

Stops the actions associated with an indicated request.

Parameters

requestID – The request ID.

Return

Action – ID associated with a fragment request.

Scriptable

Yes

GetRequestStatus

Indicates the status of a request.

Parameters

requestID – The request ID.

Return

Status (type IAction::EStatus) of the request.

Scriptable

Yes

ForceFinishRequest

Forces the actions associated with an indicated request to finish.

Parameters

requestID – The request ID.

Return

None

Scriptable

Yes

SetRequestSpeedBias

Sets speed bias for the actions associated with an indicated request.

Parameters

requestID – The request ID.

speedBias – The speed bias for this animation.

Return

None

Scriptable

Yes

GetRequestSpeedBias

Gets the speed bias for the actions associated with an indicated request.

Parameters

requestID – The request ID.

Return

Speed bias for the indicated request.

Scriptable

Yes

SetRequestAnimWeight

Sets the anim weight for the actions associated with an indicated request.

Parameters

requestID – The request ID.

animWeight – The weight for this animation.

Return

None

Scriptable

Yes

GetRequestAnimWeight

Gets the anim weight for the actions associated with an indicated request.

Parameters

requestID – The request ID.

Return

Anim weight for the indicated request.

Scriptable

Yes

EBus Request Bus Interface (Per Component)

The following methods modify how all fragments on this component are played.

PauseAll

Pauses all actions being managed by this mannequin component.

Parameters

None

Return

None

Scriptable

Yes

ResumeAll

Resumes all actions being managed by this mannequin component.

Parameters

A flag of type IActionController::EResumeFlags that indicates how the animations are to be resumed.

Return

None

Scriptable

Yes

SetTag

Sets indicated tag for this mannequin component.

Parameters

tagName – Name of the tag to be set.

Return

None

Scriptable

Yes

SetTagById

Sets indicated tag for this mannequin component.

Parameters

tagId – ID of the tag to be set.

Return

None

Scriptable

Yes

ClearTag

Clears indicated tag for this mannequin component.

Parameters

tagName – Name of the tag to be cleared.

Return

None

Scriptable

Yes

ClearTagById

Clears indicated tag for this mannequin component.

Parameters

tagId – ID of the tag to be cleared.

Return

None

Scriptable

Yes

SetGroupTag

Sets a tag in the indicated group.

Parameters

groupName – Name of the group.

tagName – Name of the tag to be set.

Return

None

Scriptable

Yes

SetGroupTagById

Sets a tag in the indicated group.

Parameters

groupId – Id of the group.

tagId – ID of the tag to be set.

Return

None

Scriptable

No

ClearGroup

Clears tags for the indicated group.

Parameters

groupName – Name of the group.

Return

None

Scriptable

Yes

ClearGroupById

Clears tags for the indicated group.

Parameters

groupId – Id of the group.

Return

None

Scriptable

No

SetScopeContext

Sets the scope context for this animation controller.

Parameters

scopeContextName – Name of the scope context that the .adb file is to be attached to.

entityId – Id of an entity whose character instance will be bound to this scope context.

animationDatabase – Path to the animation database file.

Return

None

Scriptable

Yes

SetScopeContextById

Sets the scope context for this animation controller.

Parameters

scopeContextID – ID of the scope context that the .adb file is to be attached to.

entityId – Id of an entity whose character instance will be bound to this scope context.

animationDatabase – Path to the animation database file.

Return

None

Scriptable

No

ClearScopeContext

Clears the indicated scope context.

Parameters

scopeContextName – Name of the scope context that is to be cleared.

Return

None

Scriptable

Yes

ClearScopeContextById

Clears the indicated scope context.

Parameters

scopeContextId – Id of the scope context that is to be cleared.

Return

None

Scriptable

No

GetActionController

Allows users to retrieve the action controller attached to this instance of the mannequin component.

Parameters

None

Return

The action controller being used by this mannequin component.

Scriptable

No