Skip to content

Class: entity_action ​

Composite action passed to scripted entities.

Source ​

C++ class entity_action

Custom Constructor ​

entity_action

Remarks ​

This is a container for sub-actions. The engine applies only the parts set with set_action(), and completion checks read the matching sub-action state. It is meaningful only when passed to a scripted entity controller, such as game_object.command().

Extends ​

Constructors ​

Constructor ​

ts
new entity_action(): entity_action;

Create an empty entity action.

Returns ​

entity_action

Overrides ​

EngineBinding.constructor

Constructor ​

ts
new entity_action(action: entity_action): entity_action;

Copy an existing entity action.

Parameters ​

ParameterTypeDescription
actionentity_actionAction to copy.

Returns ​

entity_action

Overrides ​

ts
EngineBinding.constructor

Methods ​

all() ​

ts
all(): boolean;

Check whether all action parts are complete.

Returns ​

boolean

Whether the action is complete.


anim() ​

ts
anim(): boolean;

Check whether the animation part is complete.

Returns ​

boolean

Whether animation is complete.


completed() ​

ts
completed(): boolean;

Check whether the whole action is complete.

Returns ​

boolean

Whether all required parts are complete.


look() ​

ts
look(): boolean;

Check whether the look part is complete.

Returns ​

boolean

Whether look handling is complete.


move() ​

ts
move(): boolean;

Check whether the movement part is complete.

Returns ​

boolean

Whether movement is complete.


object() ​

ts
object(): boolean;

Check whether the object interaction part is complete.

Returns ​

boolean

Whether object interaction is complete.


particle() ​

ts
particle(): boolean;

Check whether the particle part is complete.

Returns ​

boolean

Whether particle playback is complete.


set_action() ​

Call Signature ​

ts
set_action(move: move): void;

Set the movement part of this action.

Parameters ​
ParameterTypeDescription
movemoveMovement action.
Returns ​

void

Call Signature ​

ts
set_action(look: look): void;

Set the look part of this action.

Parameters ​
ParameterTypeDescription
looklookLook action.
Returns ​

void

Call Signature ​

ts
set_action(anim: anim): void;

Set the animation part of this action.

Parameters ​
ParameterTypeDescription
animanimAnimation action.
Returns ​

void

Call Signature ​

ts
set_action(sound: sound): void;

Set the sound part of this action.

Parameters ​
ParameterTypeDescription
soundsoundSound action.
Returns ​

void

Call Signature ​

ts
set_action(particle: particle): void;

Set the particle part of this action.

Parameters ​
ParameterTypeDescription
particleparticleParticle action.
Returns ​

void

Call Signature ​

ts
set_action(objectAction: XR_object): void;

Set the object interaction part of this action.

Parameters ​
ParameterTypeDescription
objectActionXR_objectObject action.
Returns ​

void

Call Signature ​

ts
set_action(cond: cond): void;

Set the completion condition for this action.

Parameters ​
ParameterTypeDescription
condcondCompletion condition.
Returns ​

void

Call Signature ​

ts
set_action(act: act): void;

Set a monster global action.

Parameters ​
ParameterTypeDescription
actactMonster action.
Returns ​

void

Remarks ​

Intended for custom monsters. Stalkers and ordinary inventory objects do not execute monster global actions.


sound() ​

ts
sound(): boolean;

Check whether the sound part is complete.

Returns ​

boolean

Whether sound playback is complete.


time() ​

ts
time(): boolean;

Check whether the action time condition has elapsed.

Returns ​

boolean

Whether the time condition is complete.

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