Skip to content

PerformAnimationTask ​

Inherits: BehaviorTask < Resource

Simple PerformAnimationTask using AnimationSelection resources

Properties ​

AnimationSelectionSocialanimation_selection
intloop_count0
Vector3facing_directionVector3.ZERO
Vector3animation_positionVector3.ZERO

Variables ​

intloops_completed0
boolpositioned_for_animationfalse
boolfacing_completefalse
boolanimation_startedfalse

Methods ​

voidexecute_task_start()
voidexecute_task_complete()
voidexecute_task_interrupt()
voidexecute_task_fail()

Property descriptions ​

Animation

AnimationSelectionSocial animation_selection ​

The animation selection to play

int loop_count = 0 ​

Whether to loop the animation (0 = play once, >0 = loop count)

Positioning

Vector3 facing_direction = Vector3.ZERO ​

Direction to face before starting animation (Vector3.ZERO = no change)

Vector3 animation_position = Vector3.ZERO ​

Position to move to before starting (Vector3.ZERO = current position)

Variable descriptions ​

int loops_completed = 0 ​

How many times the animation has played.

bool positioned_for_animation = false ​

True once the entity is at the place of the animation.

bool facing_complete = false ​

True once the entity faces the right way.

bool animation_started = false ​

True once the animation has started.

Method descriptions ​

void execute_task_start() ​

Starts the task.

void execute_task_complete() ​

Called when the task finishes well.

void execute_task_interrupt() ​

Called when something interrupts the task.

void execute_task_fail() ​

Called when the task fails.