Skip to content

Class: XR_object ​

Object interaction action.

Source ​

C++ class object

Custom Constructor ​

object

Remarks ​

Object actions are consumed by the object handler of an AI entity. Weapon-oriented actions such as fire1, reload, or strap require the controlled object to have a compatible active item.

Extends ​

Constructors ​

Constructor ​

ts
new XR_object(): XR_object;

Create an empty object action.

Returns ​

XR_object

Overrides ​

EngineBinding.constructor

Constructor ​

ts
new XR_object(game_object: game_object, action: TXR_object_action): XR_object;

Create an action for a game object.

Parameters ​

ParameterTypeDescription
game_objectgame_objectTarget object.
actionTXR_object_actionObject action id.

Returns ​

XR_object

Overrides ​

ts
EngineBinding.constructor

Constructor ​

ts
new XR_object(
   game_object: game_object, 
   action: TXR_object_action, 
   time: number): XR_object;

Create a timed action for a game object.

Parameters ​

ParameterTypeDescription
game_objectgame_objectTarget object.
actionTXR_object_actionObject action id.
timenumberAction time limit.

Returns ​

XR_object

Overrides ​

ts
EngineBinding.constructor

Constructor ​

ts
new XR_object(action: TXR_object_action): XR_object;

Create an object action without a target.

Parameters ​

ParameterTypeDescription
actionTXR_object_actionObject action id.

Returns ​

XR_object

Overrides ​

ts
EngineBinding.constructor

Constructor ​

ts
new XR_object(object_name: string, action: TXR_object_action): XR_object;

Create an action for an object by name.

Parameters ​

ParameterTypeDescription
object_namestringTarget object name.
actionTXR_object_actionObject action id.

Returns ​

XR_object

Overrides ​

ts
EngineBinding.constructor

Methods ​

action() ​

ts
action(action: TXR_object_action): void;

Set the object action mode.

Parameters ​

ParameterTypeDescription
actionTXR_object_actionObject action id.

Returns ​

void


completed() ​

ts
completed(): boolean;

Check whether the object action is complete.

Returns ​

boolean

Whether the action is complete.


object() ​

Call Signature ​

ts
object(object_name: string): void;

Set target object by name.

Parameters ​
ParameterTypeDescription
object_namestringTarget object name.
Returns ​

void

Call Signature ​

ts
object(game_object: game_object): void;

Set target object.

Parameters ​
ParameterTypeDescription
game_objectgame_objectTarget object.
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


activate ​

ts
readonly static activate: 16;

Engine enum value for XR_object.activate.


aim1 ​

ts
readonly static aim1: 4;

Engine enum value for XR_object.aim1.


aim2 ​

ts
readonly static aim2: 5;

Engine enum value for XR_object.aim2.


deactivate ​

ts
readonly static deactivate: 17;

Engine enum value for XR_object.deactivate.


drop ​

ts
readonly static drop: 11;

Engine enum value for XR_object.drop.


dummy ​

ts
readonly static dummy: -1;

Engine enum value for XR_object.dummy.


fire1 ​

ts
readonly static fire1: 6;

Engine enum value for XR_object.fire1.


fire2 ​

ts
readonly static fire2: 8;

Engine enum value for XR_object.fire2.


hide ​

ts
readonly static hide: 22;

Engine enum value for XR_object.hide.


idle ​

ts
readonly static idle: 9;

Engine enum value for XR_object.idle.


reload ​

ts
readonly static reload: 2;

Engine enum value for XR_object.reload.


reload1 ​

ts
readonly static reload1: 2;

Engine enum value for XR_object.reload1.


reload2 ​

ts
readonly static reload2: 3;

Engine enum value for XR_object.reload2.


show ​

ts
readonly static show: 21;

Engine enum value for XR_object.show.


strap ​

ts
readonly static strap: 10;

Engine enum value for XR_object.strap.


switch1 ​

ts
readonly static switch1: 0;

Engine enum value for XR_object.switch1.


switch2 ​

ts
readonly static switch2: 1;

Engine enum value for XR_object.switch2.


take ​

ts
readonly static take: 23;

Engine enum value for XR_object.take.


turn_off ​

ts
readonly static turn_off: 20;

Engine enum value for XR_object.turn_off.


turn_on ​

ts
readonly static turn_on: 19;

Engine enum value for XR_object.turn_on.


use ​

ts
readonly static use: 18;

Engine enum value for XR_object.use.