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
new entity_action(): entity_action;Create an empty entity action.
Returns
entity_action
Overrides
Constructor
new entity_action(action: entity_action): entity_action;Copy an existing entity action.
Parameters
| Parameter | Type | Description |
|---|---|---|
action | entity_action | Action to copy. |
Returns
entity_action
Overrides
EngineBinding.constructorMethods
all()
all(): boolean;Check whether all action parts are complete.
Returns
boolean
Whether the action is complete.
anim()
anim(): boolean;Check whether the animation part is complete.
Returns
boolean
Whether animation is complete.
completed()
completed(): boolean;Check whether the whole action is complete.
Returns
boolean
Whether all required parts are complete.
look()
look(): boolean;Check whether the look part is complete.
Returns
boolean
Whether look handling is complete.
move()
move(): boolean;Check whether the movement part is complete.
Returns
boolean
Whether movement is complete.
object()
object(): boolean;Check whether the object interaction part is complete.
Returns
boolean
Whether object interaction is complete.
particle()
particle(): boolean;Check whether the particle part is complete.
Returns
boolean
Whether particle playback is complete.
set_action()
Call Signature
set_action(move: move): void;Set the movement part of this action.
Parameters
| Parameter | Type | Description |
|---|---|---|
move | move | Movement action. |
Returns
void
Call Signature
set_action(look: look): void;Set the look part of this action.
Parameters
| Parameter | Type | Description |
|---|---|---|
look | look | Look action. |
Returns
void
Call Signature
set_action(anim: anim): void;Set the animation part of this action.
Parameters
| Parameter | Type | Description |
|---|---|---|
anim | anim | Animation action. |
Returns
void
Call Signature
set_action(sound: sound): void;Set the sound part of this action.
Parameters
| Parameter | Type | Description |
|---|---|---|
sound | sound | Sound action. |
Returns
void
Call Signature
set_action(particle: particle): void;Set the particle part of this action.
Parameters
| Parameter | Type | Description |
|---|---|---|
particle | particle | Particle action. |
Returns
void
Call Signature
set_action(objectAction: XR_object): void;Set the object interaction part of this action.
Parameters
| Parameter | Type | Description |
|---|---|---|
objectAction | XR_object | Object action. |
Returns
void
Call Signature
set_action(cond: cond): void;Set the completion condition for this action.
Parameters
| Parameter | Type | Description |
|---|---|---|
cond | cond | Completion condition. |
Returns
void
Call Signature
set_action(act: act): void;Set a monster global action.
Parameters
| Parameter | Type | Description |
|---|---|---|
act | act | Monster action. |
Returns
void
Remarks
Intended for custom monsters. Stalkers and ordinary inventory objects do not execute monster global actions.
sound()
sound(): boolean;Check whether the sound part is complete.
Returns
boolean
Whether sound playback is complete.
time()
time(): boolean;Check whether the action time condition has elapsed.
Returns
boolean
Whether the time condition is complete.
Properties
__name
readonly __name: string;LuaBind instance constructor name.
Inherited from
__name
readonly static __name: string;LuaBind class constructor name.