Skip to content

Class: anim

Animation action.

Source

C++ class anim

Custom Constructor

anim

Remarks

String animation overloads play a named script animation. Numeric one-argument overloads set an AI mental state. Numeric two-argument overloads are monster animation actions.

Extends

Constructors

Constructor

ts
new anim(): anim;

Create an empty animation action.

Returns

anim

Overrides

EngineBinding.constructor

Constructor

ts
new anim(value: string): anim;

Play an animation by name.

Parameters

ParameterTypeDescription
valuestringAnimation name.

Returns

anim

Overrides

ts
EngineBinding.constructor

Constructor

ts
new anim(value1: string, value2: boolean): anim;

Play an animation by name.

Parameters

ParameterTypeDescription
value1stringAnimation name.
value2booleanWhether the animation should loop.

Returns

anim

Overrides

ts
EngineBinding.constructor

Constructor

ts
new anim(state: TXR_mental_state): anim;

Set AI mental state.

Parameters

ParameterTypeDescription
stateTXR_mental_stateMental state id.

Returns

anim

Overrides

ts
EngineBinding.constructor

Constructor

ts
new anim(state: TXR_monster_animation_action, value: number): anim;

Set monster animation action and extra value.

Parameters

ParameterTypeDescription
stateTXR_monster_animation_actionMonster animation action id.
valuenumberExtra action value.

Returns

anim

Remarks

Monster-only overload using MonsterSpace::EScriptMonsterAnimAction values exposed on anim.

Overrides

ts
EngineBinding.constructor

Methods

anim()

ts
anim(value: string): void;

Set animation name.

Parameters

ParameterTypeDescription
valuestringAnimation name.

Returns

void


completed()

ts
completed(): boolean;

Returns

boolean

Whether the animation action is complete.


type()

ts
type(state: TXR_mental_state): void;

Set mental state.

Parameters

ParameterTypeDescription
stateTXR_mental_stateMental state id.

Returns

void

Properties

__name

ts
readonly __name: string;

LuaBind instance constructor name.

Inherited from

EngineBinding.__name


__name

ts
readonly static __name: string;

LuaBind class constructor name.

Inherited from

EngineBinding.__name


attack

ts
readonly static attack: 7;

Engine enum value for anim.attack.


capture_prepare

ts
readonly static capture_prepare: 1;

Engine enum value for anim.capture_prepare.


danger

ts
readonly static danger: 0;

Engine enum value for anim.danger.


eat

ts
readonly static eat: 4;

Engine enum value for anim.eat.


free

ts
readonly static free: 1;

Engine enum value for anim.free.


lie_idle

ts
readonly static lie_idle: 3;

Engine enum value for anim.lie_idle.


look_around

ts
readonly static look_around: 8;

Engine enum value for anim.look_around.


panic

ts
readonly static panic: 2;

Engine enum value for anim.panic.


rest

ts
readonly static rest: 6;

Engine enum value for anim.rest.


sit_idle

ts
readonly static sit_idle: 2;

Engine enum value for anim.sit_idle.


sleep

ts
readonly static sleep: 5;

Engine enum value for anim.sleep.


stand_idle

ts
readonly static stand_idle: 0;

Engine enum value for anim.stand_idle.


turn

ts
readonly static turn: 9;

Engine enum value for anim.turn.