Skip to content

Class: MockGameObject

Abstract game object mock.

Implements

  • game_object

Accessors

bleeding

Get Signature

ts
get bleeding(): number;

Intensity of actor bleeding. 0 - no bleeding.

Remarks

Assignment applies a delta through CScriptGameObject::SetBleeding, not an absolute value.

Returns

number

Set Signature

ts
set bleeding(delta: number): void;

Intensity of actor bleeding. 0 - no bleeding.

Remarks

Assignment applies a delta through CScriptGameObject::SetBleeding, not an absolute value.

Parameters
ParameterType
deltanumber
Returns

void

Implementation of

ts
game_object.bleeding

health

Get Signature

ts
get health(): number;

Object health value from 0 to 1.

Remarks

Assignment applies a delta through CScriptGameObject::SetHealth, not an absolute value. Use set_health_ex when the script must set exact health.

Returns

number

Set Signature

ts
set health(delta: number): void;

Object health value from 0 to 1.

Remarks

Assignment applies a delta through CScriptGameObject::SetHealth, not an absolute value. Use set_health_ex when the script must set exact health.

Parameters
ParameterType
deltanumber
Returns

void

Implementation of

ts
game_object.health

morale

Get Signature

ts
get morale(): number;

Creature morale value.

Remarks

Assignment applies a delta through CScriptGameObject::SetMorale, not an absolute value.

Returns

number

Set Signature

ts
set morale(delta: number): void;

Creature morale value.

Remarks

Assignment applies a delta through CScriptGameObject::SetMorale, not an absolute value.

Parameters
ParameterType
deltanumber
Returns

void

Implementation of

ts
game_object.morale

power

Get Signature

ts
get power(): number;

Actor stamina/power value.

Remarks

Assignment applies a delta through CScriptGameObject::SetPower, not an absolute value.

Returns

number

Set Signature

ts
set power(delta: number): void;

Actor stamina/power value.

Remarks

Assignment applies a delta through CScriptGameObject::SetPower, not an absolute value.

Parameters
ParameterType
deltanumber
Returns

void

Implementation of

ts
game_object.power

psy_health

Get Signature

ts
get psy_health(): number;

Psy health value.

Remarks

Assignment applies a delta through CScriptGameObject::SetPsyHealth, not an absolute value.

Returns

number

Set Signature

ts
set psy_health(delta: number): void;

Psy health value.

Remarks

Assignment applies a delta through CScriptGameObject::SetPsyHealth, not an absolute value.

Parameters
ParameterType
deltanumber
Returns

void

Implementation of

ts
game_object.psy_health

radiation

Get Signature

ts
get radiation(): number;

Actor radiation value.

Remarks

Assignment applies a delta through CScriptGameObject::SetRadiation, not an absolute value.

Returns

number

Set Signature

ts
set radiation(delta: number): void;

Actor radiation value.

Remarks

Assignment applies a delta through CScriptGameObject::SetRadiation, not an absolute value.

Parameters
ParameterType
deltanumber
Returns

void

Implementation of

ts
game_object.radiation

satiety

Get Signature

ts
get satiety(): number;

Actor satiety value.

Remarks

Assignment applies a delta through CScriptGameObject::ChangeSatiety, not an absolute value.

Returns

number

Set Signature

ts
set satiety(delta: number): void;

Actor satiety value.

Remarks

Assignment applies a delta through CScriptGameObject::ChangeSatiety, not an absolute value.

Parameters
ParameterType
deltanumber
Returns

void

Implementation of

ts
game_object.satiety

Constructors

Constructor

ts
new MockGameObject(config?: IMockGameObjectConfig): MockGameObject;

Parameters

ParameterType
configIMockGameObjectConfig

Returns

MockGameObject

Methods

asGameObject()

ts
asGameObject(): game_object;

Returns

game_object


asMock()

ts
static asMock(object: game_object): MockGameObject;

Parameters

ParameterType
objectgame_object

Returns

MockGameObject


callCallback()

ts
static callCallback(
   object: game_object, 
   id: TXR_callback, ...
   args: any[]): void;

Parameters

ParameterType
objectgame_object
idTXR_callback
...argsany[]

Returns

void


clamp()

ts
static clamp(
   value: number, 
   min: number, 
   max: number): number;

Parameters

ParameterType
valuenumber
minnumber
maxnumber

Returns

number


create()

ts
static create(config?: IMockGameObjectConfig): MockGameObject;

Parameters

ParameterType
configIMockGameObjectConfig

Returns

MockGameObject


createActor()

ts
static createActor(config?: IMockGameObjectConfig): MockGameObject;

Parameters

ParameterType
configIMockGameObjectConfig

Returns

MockGameObject


mock()

ts
static mock(config?: IMockGameObjectConfig): game_object;

Parameters

ParameterType
configIMockGameObjectConfig

Returns

game_object


mockActor()

ts
static mockActor(config?: IMockGameObjectConfig): game_object;

Parameters

ParameterType
configIMockGameObjectConfig

Returns

game_object


mockHelicopter()

ts
static mockHelicopter(config?: IMockGameObjectConfig): game_object;

Parameters

ParameterType
configIMockGameObjectConfig

Returns

game_object


mockStalker()

ts
static mockStalker(base?: IMockGameObjectConfig): game_object;

Parameters

ParameterType
baseIMockGameObjectConfig

Returns

game_object


mockWithClassId()

ts
static mockWithClassId(clsid: number): game_object;

Parameters

ParameterType
clsidnumber

Returns

game_object


mockWithSection()

ts
static mockWithSection(section: string): game_object;

Parameters

ParameterType
sectionstring

Returns

game_object

Properties

accessible

ts
accessible: Mock<() => boolean>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

position

Target position to check.

Returns

If target position is accessible by the object.

Implementation of

ts
game_object.accessible

accessible_nearest

ts
accessible_nearest: MockedFunction<(vertex_position: vector, target_position: vector) => LuaMultiReturn<[number, vector]>>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

vertex_position

Position to test from.

Param

target_position

Desired target position.

Returns

Level vertex id and accessible position.

Implementation of

ts
game_object.accessible_nearest

accuracy

ts
accuracy: MockedFunction<() => number>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Weapon accuracy for this inventory owner.

Implementation of

ts
game_object.accuracy

action

ts
action: Mock<() => null>;

Get current entity action.

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Returns

Current action, or null when no action is active.

Implementation of

ts
game_object.action

action_by_index

ts
action_by_index: MockedFunction<(index: number) => Nullable<entity_action>>;

Get queued action by index.

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Param

index

Action index.

Returns

Action object, or null.

Implementation of

ts
game_object.action_by_index

action_count

ts
action_count: MockedFunction<() => number>;

Get queued action count.

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Returns

Number of queued actions.

Implementation of

ts
game_object.action_count

activate_slot

ts
activate_slot: Mock<UnknownFunction>;

Activate an inventory slot.

Param

index

Slot id.

Implementation of

ts
game_object.activate_slot

active_detector

ts
active_detector: Mock<() => null>;

Get active detector item.

Source

src/xrGame/script_game_object_inventory_owner.cpp, CScriptGameObject::active_detector.

Remarks

Requires this object to be a CInventoryOwner. The binding reads the detector slot and returns the detector only while it is working. Missing inventory owner, empty detector slot, or inactive detector returns null.

Returns

Working detector item, or null.

Implementation of

ts
game_object.active_detector

active_item

ts
active_item: Mock<() => null>;

Get active inventory item.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::GetActiveItem.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return null.

Returns

Active inventory item, or null when no item is active.

Implementation of

ts
game_object.active_item

active_slot

ts
active_slot: MockedFunction<<T>() => T>;

Returns

Active item slot of game object.

Implementation of

ts
game_object.active_slot

active_sound_count

ts
active_sound_count: MockedFunction<{
  (): number;
  (only_playing: boolean): number;
}>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Number of active sounds registered on this object.

Implementation of

ts
game_object.active_sound_count

active_zone_contact

ts
active_zone_contact: MockedFunction<(zone_id: number) => boolean>;

Check whether the object contacts an active zone.

Remarks

Intended for alive objects that track zone contacts. Zone ids are runtime object ids, not story ids.

Param

zone_id

Zone object id.

Returns

Whether contact is active.

Implementation of

ts
game_object.active_zone_contact

actor_look_at_point

ts
actor_look_at_point: MockedFunction<(position: vector) => void>;

Force actor look direction toward a point.

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

position

Point to look at.

Implementation of

ts
game_object.actor_look_at_point

add_animation

ts
add_animation: Mock<UnknownFunction>;

Queue animation by name.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

animation

Animation name.

Param

hand_usage

Whether the animation uses hands.

Param

use_movement_controller

Whether movement controller should drive the animation.

Implementation of

ts
game_object.add_animation

add_combat_sound

ts
add_combat_sound: MockedFunction<(prefix: string, max_count: number, type: TXR_snd_type, priority: number, mask: number, internal_type: number, bone: string) => number>;

Register a combat sound.

Source

src/xrGame/script_game_object4.cpp, CScriptGameObject::add_combat_sound.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return 0.

Param

prefix

Sound prefix.

Param

max_count

Maximum samples in the sound collection.

Param

type

AI sound category.

Param

priority

Sound priority.

Param

mask

Sound synchronization mask.

Param

internal_type

Internal stalker sound id.

Param

bone

Bone name used for playback placement.

Returns

Registered sound id, or 0 when this object is not a stalker.

Implementation of

ts
game_object.add_combat_sound

add_restrictions

ts
add_restrictions: Mock<(outAdd: string, inAdd: string) => void>;

Add movement restrictions.

Remarks

Requires an object with AI path restriction support. Inventory-only objects and static props do not have meaningful in/out restriction lists.

Param

out_restriction

Restrictor name used as outside boundary.

Param

in_restriction

Restrictor name used as inside boundary.

Implementation of

ts
game_object.add_restrictions

add_sound

ts
add_sound: MockedFunction<{
  (prefix: string, max_count: number, type: TXR_snd_type, priority: number, mask: number, internal_type: number): number;
  (prefix: string, max_count: number, type: TXR_snd_type, priority: number, mask: number, internal_type: number, bone: string): number;
}>;

Register an NPC sound.

Source

src/xrGame/script_game_object4.cpp, CScriptGameObject::add_sound.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

prefix

Sound prefix.

Param

max_count

Maximum samples in the sound collection.

Param

type

AI sound category.

Param

priority

Sound priority.

Param

mask

Sound synchronization mask.

Param

internal_type

Internal monster sound id.

Returns

Registered sound id, or 0 when this object is not a custom monster.

Implementation of

ts
game_object.add_sound

add_upgrade

ts
add_upgrade: MockedFunction<(upgrade_section: string) => boolean>;

Add an upgrade section.

Since

OpenXRay 2023-10-19, a6016f10, PR #1463

Param

upgrade_section

Section of upgrade to add.

Returns

Whether upgrade is installed successfully or not.

Implementation of

ts
game_object.add_upgrade

aim_bone_id

ts
aim_bone_id: MockedFunction<{
  (): string;
  (bone: string): void;
}>;

Get aimed bone id.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Bone name.

Implementation of

ts
game_object.aim_bone_id

aim_time

ts
aim_time: Mock<(_weapon: game_object, _aimTime?: number) => number>;

Get aim time for a target.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

object

Target object.

Returns

Aim time.

Implementation of

ts
game_object.aim_time

alive

ts
alive: Mock<() => boolean>;

Returns

Whether game object is alive.

Implementation of

ts
game_object.alive

allow_break_talk_dialog

ts
allow_break_talk_dialog: MockedFunction<(value: boolean) => void>;

Allow or block breaking the current actor talk dialog.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

value

Whether the dialog may be interrupted.

Implementation of

ts
game_object.allow_break_talk_dialog

allow_sprint

ts
allow_sprint: MockedFunction<(is_allowed: boolean) => void>;

Enable or disable actor sprint.

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

is_allowed

Whether sprint is allowed.

Implementation of

ts
game_object.allow_sprint

ammo_box_size

ts
ammo_box_size: MockedFunction<() => number>;

Get configured ammo box size for this ammo item.

Since

OpenXRay 2022-12-25, 3afded2f, PR #1190

Remarks

Requires this object to be a CWeaponAmmo item. Other object types log a script error and return 0.

Returns

Configured ammo box size.

Implementation of

ts
game_object.ammo_box_size

ammo_get_count

ts
ammo_get_count: MockedFunction<() => number>;

Get current ammo count in this ammo box.

Since

OpenXRay 2022-12-25, 3afded2f, PR #1190

Remarks

Requires this object to be a CWeaponAmmo item. Other object types log a script error and return 0.

Returns

Ammo count in this ammo box.

Implementation of

ts
game_object.ammo_get_count

ammo_set_count

ts
ammo_set_count: MockedFunction<(count: number) => void>;

Set ammo count for this ammo box.

Since

OpenXRay 2022-12-25, 3afded2f, PR #1190

Remarks

Requires this object to be a CWeaponAmmo item. Other object types log a script error and do nothing.

Param

count

Ammo count.

Implementation of

ts
game_object.ammo_set_count

animation_count

ts
animation_count: Mock<() => number>;

Get animation count.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Animation count.

Implementation of

ts
game_object.animation_count

animation_slot

ts
animation_slot: Mock<() => number>;

Get current animation slot.

Remarks

Meaningful for animated alive objects. For objects without animation controller state, the engine can return a default value.

Returns

Animation slot id.

Implementation of

ts
game_object.animation_slot

apply_loophole_direction_distance

ts
apply_loophole_direction_distance: MockedFunction<{
  (): number;
  (distance: number): void;
}>;

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Returns

Distance used when applying smart-cover loophole direction.

Implementation of

ts
game_object.apply_loophole_direction_distance

attach_vehicle

ts
attach_vehicle: MockedFunction<(vehicle: game_object, force: boolean) => void>;

Attach actor to a vehicle or holder.

Since

OpenXRay 2015-06-16, 0fe21c14

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

vehicle

Vehicle object.

Param

force

Whether attach should be forced.

Implementation of

ts
game_object.attach_vehicle

attachable_item_enabled

ts
attachable_item_enabled: MockedFunction<() => boolean>;

Remarks

Requires this object to be an attachable item. Other object types log a script error and return a default value or do nothing.

Returns

Whether this attachable item is enabled.

Implementation of

ts
game_object.attachable_item_enabled

attachable_item_load_attach

ts
attachable_item_load_attach: MockedFunction<(section: string) => void>;

Reload attach position for this attachable item from a section.

Remarks

Requires this object to be an attachable item. Other object types log a script error and return a default value or do nothing.

Param

section

Config section with attach data.

Implementation of

ts
game_object.attachable_item_load_attach

base_in_restrictions

ts
base_in_restrictions: MockedFunction<() => string>;

Returns

Base incoming restriction list.

Implementation of

ts
game_object.base_in_restrictions

base_out_restrictions

ts
base_out_restrictions: MockedFunction<() => string>;

Get base outside restrictions.

Remarks

Requires an object with AI path restriction support.

Returns

Restriction list.

Implementation of

ts
game_object.base_out_restrictions

belt_count

ts
belt_count: MockedFunction<() => number>;

Get actor belt slot count.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Number of items on the belt.

Implementation of

ts
game_object.belt_count

berserk

ts
berserk: MockedFunction<() => void>;

Switch monster into berserk state.

Remarks

Requires a custom monster. It is not a generic combat command for stalkers or the actor.

Implementation of

ts
game_object.berserk

best_cover

ts
best_cover: MockedFunction<(position: vector, enemy_position: vector, min_distance: number, max_distance: number, deviation: number) => cover_point>;

Find the best cover from one position against another.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

position

Search origin.

Param

enemy_position

Threat position.

Param

min_distance

Minimum distance.

Param

max_distance

Maximum distance.

Param

deviation

Allowed direction deviation.

Returns

Cover point.

Implementation of

ts
game_object.best_cover

best_danger

ts
best_danger: Mock<() => null>;

Get most relevant danger object.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Danger object, or null.

Implementation of

ts
game_object.best_danger

best_enemy

ts
best_enemy: Mock<() => null>;

Get best enemy selected by monster memory.

Source

src/xrGame/script_game_object2.cpp, CScriptGameObject::GetBestEnemy.

Remarks

Requires this object to be a CCustomMonster. The binding reads the selected enemy from monster memory and returns null when the object is not a monster or no enemy is selected.

Returns

Selected enemy object, or null.

Implementation of

ts
game_object.best_enemy

best_item

ts
best_item: Mock<() => null>;

Get best remembered item for this object.

Source

src/xrGame/script_game_object2.cpp, CScriptGameObject::GetBestItem.

Remarks

Requires this object to be a CCustomMonster. This is the selected item from monster memory, not the best item in the object's inventory. Non-monster objects or monsters without a selected item return null.

Returns

Best remembered item, or null.

Implementation of

ts
game_object.best_item

best_weapon

ts
best_weapon: Mock<() => null>;

Get best available weapon for this object.

Source

src/xrGame/script_game_object2.cpp, CScriptGameObject::best_weapon.

Remarks

Requires this object to be a CAI_Stalker. The binding reads the stalker object handler's best weapon candidate and returns it only when the item still belongs to this object. Non-stalker objects, missing candidates, and candidates owned by another object return null.

Returns

Best weapon candidate, or null.

Implementation of

ts
game_object.best_weapon

bind_object

ts
bind_object: Mock<UnknownFunction>;

Attach a Lua binder to this object.

Param

binder

Binder instance adopted by the engine.

Implementation of

ts
game_object.bind_object

binded_object

ts
binded_object: MockedFunction<() => object_binder>;

Get attached Lua binder.

Returns

Bound object binder.

Implementation of

ts
game_object.binded_object

body_state

ts
body_state: MockedFunction<() => TXR_body_state>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Current stalker body state.

Implementation of

ts
game_object.body_state

bone_position

ts
bone_position: MockedFunction<(bone: string) => vector>;

Get model bone world position.

Remarks

Requires this object to have a renderable visual. Objects without a visual can log an engine error or return a default value.

Param

bone

Bone name.

Returns

Bone position.

Implementation of

ts
game_object.bone_position

bone_visible

ts
bone_visible: MockedFunction<(bone: string) => boolean>;

Check whether a bone is visible.

Since

OpenXRay 2015-07-07, 6e703b4c

Remarks

Requires this object to have a renderable visual. Objects without a visual can log an engine error or return a default value.

Param

bone

Bone name.

Returns

Whether bone is visible.

Implementation of

ts
game_object.bone_visible

burer_get_force_gravi_attack

ts
burer_get_force_gravi_attack: Mock<() => boolean>;

Remarks

Requires this object to be a burer. Other object types log a script error and return a default value or do nothing.

Returns

Whether this burer is forced to use a gravity attack.

Implementation of

ts
game_object.burer_get_force_gravi_attack

burer_set_force_gravi_attack

ts
burer_set_force_gravi_attack: Mock<UnknownFunction>;

Toggle burer gravity attack override.

Remarks

Requires this object to be a burer. Other object types log a script error and return a default value or do nothing.

Param

value

Whether forced gravity attack is enabled.

Implementation of

ts
game_object.burer_set_force_gravi_attack

buy_condition

ts
buy_condition: Mock<UnknownFunction>;

Set trade buy conditions from an ini section.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

ini_file

Trade config.

Param

section

Condition section.

Implementation of

ts
game_object.buy_condition

buy_item_condition_factor

ts
buy_item_condition_factor: Mock<UnknownFunction>;

Set item condition factor used by buying logic.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

factor

Condition factor.

Implementation of

ts
game_object.buy_item_condition_factor

buy_supplies

ts
buy_supplies: Mock<UnknownFunction>;

Buy supplies described by a config section.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

ini

Trade config.

Param

section

Supply section.

Implementation of

ts
game_object.buy_supplies

callbacks

ts
callbacks: Partial<Record<TXR_callback, (this: void, ...args: any[]) => any>> = {};

callCallback

ts
callCallback: Mock<(id: TXR_callback, ...args: any[]) => any>;

can_add_upgrade

ts
can_add_upgrade: MockedFunction<(upgrade_section: string) => boolean>;

Check whether an upgrade can be added.

Since

OpenXRay 2023-10-19, a6016f10, PR #1463

Param

upgrade_section

Section of upgrade to check.

Returns

Whether upgrade can be added.

Implementation of

ts
game_object.can_add_upgrade

can_install_upgrade

ts
can_install_upgrade: MockedFunction<(upgrade_section: string) => boolean>;

Check whether an upgrade can be installed.

Since

OpenXRay 2023-10-19, a6016f10, PR #1463

Param

upgrade_section

Section of upgrade to check.

Returns

Whether upgrade can be installed.

Implementation of

ts
game_object.can_install_upgrade

can_script_capture

ts
can_script_capture: MockedFunction<() => boolean>;

Check whether scripts can capture this object.

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Returns

Whether script capture is allowed.

Implementation of

ts
game_object.can_script_capture

can_select_weapon

ts
can_select_weapon: MockedFunction<{
  (): boolean;
  (is_enabled: boolean): void;
}>;

Check whether this object can select a weapon.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether weapon selection is enabled.

Implementation of

ts
game_object.can_select_weapon

can_throw_grenades

ts
can_throw_grenades: MockedFunction<{
  (): boolean;
  (is_enabled: boolean): void;
}>;

Check whether this object can throw grenades.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether grenade throwing is enabled.

Implementation of

ts
game_object.can_throw_grenades

cast_Actor

ts
cast_Actor: MockedFunction<() => Nullable<CActor>>;

Cast this object to an actor wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Actor wrapper, or null.

Implementation of

ts
game_object.cast_Actor

cast_Ammo

ts
cast_Ammo: MockedFunction<() => Nullable<CWeaponAmmo>>;

Cast this object to an ammo wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Ammo wrapper, or null.

Implementation of

ts
game_object.cast_Ammo

cast_Artefact

ts
cast_Artefact: MockedFunction<() => Nullable<CArtefact>>;

Cast this object to an artefact wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Artefact wrapper, or null.

Implementation of

ts
game_object.cast_Artefact

cast_Car

ts
cast_Car: MockedFunction<() => Nullable<CCar>>;

Cast this object to a car wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Car wrapper, or null.

Implementation of

ts
game_object.cast_Car

cast_CustomZone

ts
cast_CustomZone: MockedFunction<() => Nullable<CCustomZone>>;

Cast this object to a custom zone wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Custom zone wrapper, or null.

Implementation of

ts
game_object.cast_CustomZone

cast_EntityAlive

ts
cast_EntityAlive: MockedFunction<() => Nullable<CEntityAlive>>;

Cast this object to an alive entity wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Alive entity wrapper, or null.

Implementation of

ts
game_object.cast_EntityAlive

cast_Explosive

ts
cast_Explosive: MockedFunction<() => Nullable<explosive>>;

Cast this object to an explosive wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Explosive wrapper, or null.

Implementation of

ts
game_object.cast_Explosive

cast_GameObject

ts
cast_GameObject: MockedFunction<() => Nullable<CGameObject>>;

Cast this object to a base game object wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Game object wrapper, or null.

Implementation of

ts
game_object.cast_GameObject

cast_Heli

ts
cast_Heli: MockedFunction<() => Nullable<CHelicopter>>;

Cast this object to a helicopter wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Helicopter wrapper, or null.

Implementation of

ts
game_object.cast_Heli

cast_HolderCustom

ts
cast_HolderCustom: MockedFunction<() => Nullable<holder>>;

Cast this object to a holder wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Holder wrapper, or null.

Implementation of

ts
game_object.cast_HolderCustom

cast_InventoryItem

ts
cast_InventoryItem: MockedFunction<() => Nullable<CInventoryItem>>;

Cast this object to an inventory item wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Inventory item wrapper, or null.

Implementation of

ts
game_object.cast_InventoryItem

cast_InventoryOwner

ts
cast_InventoryOwner: MockedFunction<() => Nullable<CInventoryOwner>>;

Cast this object to an inventory owner wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Inventory owner wrapper, or null.

Implementation of

ts
game_object.cast_InventoryOwner

cast_Monster

ts
cast_Monster: MockedFunction<() => Nullable<CCustomMonster>>;

Cast this object to a custom monster wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Custom monster wrapper, or null.

Implementation of

ts
game_object.cast_Monster

cast_PhysicsShellHolder

ts
cast_PhysicsShellHolder: MockedFunction<() => Nullable<CPhysicsShellHolder>>;

Cast this object to a physics shell holder wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Physics shell holder wrapper, or null.

Implementation of

ts
game_object.cast_PhysicsShellHolder

cast_ScriptZone

ts
cast_ScriptZone: MockedFunction<() => Nullable<ce_script_zone>>;

Cast this object to a script zone wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Script zone wrapper, or null.

Implementation of

ts
game_object.cast_ScriptZone

cast_SpaceRestrictor

ts
cast_SpaceRestrictor: MockedFunction<() => Nullable<CSpaceRestrictor>>;

Cast this object to a space restrictor wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Space restrictor wrapper, or null.

Implementation of

ts
game_object.cast_SpaceRestrictor

cast_Stalker

ts
cast_Stalker: MockedFunction<() => Nullable<CAI_Stalker>>;

Cast this object to a stalker wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Stalker wrapper, or null.

Implementation of

ts
game_object.cast_Stalker

cast_Weapon

ts
cast_Weapon: MockedFunction<() => Nullable<CWeapon>>;

Cast this object to a weapon wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Weapon wrapper, or null.

Implementation of

ts
game_object.cast_Weapon

cast_WeaponMagazined

ts
cast_WeaponMagazined: MockedFunction<() => Nullable<CWeaponMagazined>>;

Cast this object to a magazined weapon wrapper.

Remarks

Returns the requested wrapper only when the runtime object has that engine type; otherwise the cast result may be null at runtime.

Returns

Magazined weapon wrapper, or null.

Implementation of

ts
game_object.cast_WeaponMagazined

center

ts
center: Mock<() => vector>;

Get object center position.

Returns

Center position.

Implementation of

ts
game_object.center

change_character_rank

ts
change_character_rank: MockedFunction<(delta: number) => void>;

Add a delta to character rank.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

delta

Rank delta.

Implementation of

ts
game_object.change_character_rank

change_character_reputation

ts
change_character_reputation: Mock<UnknownFunction>;

Add a delta to character reputation.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

delta

Reputation delta.

Implementation of

ts
game_object.change_character_reputation

change_goodwill

ts
change_goodwill: MockedFunction<(delta_goodwill: number, to_object: game_object) => void>;

Add a delta to goodwill toward another object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

delta_goodwill

Goodwill delta.

Param

to_object

Target object.

Implementation of

ts
game_object.change_goodwill

change_team

ts
change_team: Mock<UnknownFunction>;

Change team, squad, and group ids.

Remarks

Intended for alive AI objects. It changes runtime relation grouping, not smart-terrain squad membership.

Param

team_id

Team id.

Param

squad_id

Squad id.

Param

group_id

Group id.

Implementation of

ts
game_object.change_team

character_community

ts
character_community: MockedFunction<<T>() => T>;

Returns

Object community like monolith, stalker or zombied.

Implementation of

ts
game_object.character_community

character_icon

ts
character_icon: <T>() => T;

Get character icon id.

Type Parameters

Type Parameter
T

Returns

T

Icon id.

Implementation of

ts
game_object.character_icon

character_name

ts
character_name: MockedFunction<<T>() => T>;

Get localized character name.

Returns

Character display name.

Implementation of

ts
game_object.character_name

character_rank

ts
character_rank: Mock<() => number>;

Get character rank value.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Rank value.

Implementation of

ts
game_object.character_rank

character_reputation

ts
character_reputation: MockedFunction<() => number>;

Get character reputation.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Reputation value.

Implementation of

ts
game_object.character_reputation

clear_animations

ts
clear_animations: Mock<UnknownFunction>;

Remove queued animations.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.clear_animations

clear_callbacks

ts
clear_callbacks: Mock<() => void>;

Clear all callbacks registered on this object.

Implementation of

ts
game_object.clear_callbacks

clear_game_news

ts
clear_game_news: MockedFunction<() => void>;

Clear queued game news for this inventory owner.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.clear_game_news

clear_override_animation

ts
clear_override_animation: Mock<UnknownFunction>;

Clear override animation.

Implementation of

ts
game_object.clear_override_animation

clsid

ts
clsid: Mock<() => TXR_class_id>;

Get engine class id.

Returns

Class id constant.

Implementation of

ts
game_object.clsid

command

ts
command: Mock<UnknownFunction>;

Add action for game object entity. Depending on priority pushes it to back or front of actions list.

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Param

entity_action

Action to perform.

Param

is_high_priority

Whether it is high priority action.

Implementation of

ts
game_object.command

community

ts
community: Mock<() => string>;

community_goodwill

ts
community_goodwill: MockedFunction<(from_community: string) => number>;

Get goodwill toward a community.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

from_community

Community id.

Returns

Goodwill value.

Implementation of

ts
game_object.community_goodwill

condition

ts
condition: MockedFunction<() => number>;

Get item condition.

Remarks

Requires an inventory item or another object with condition/durability data.

Returns

Condition value.

Implementation of

ts
game_object.condition

cost

ts
cost: MockedFunction<() => number>;

Get object cost.

Remarks

Requires an inventory item or tradeable object. Non-item objects can report an engine default.

Returns

Cost.

Implementation of

ts
game_object.cost

critically_wounded

ts
critically_wounded: Mock<() => boolean>;

Check whether NPC is critically wounded.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether object is critically wounded.

Implementation of

ts
game_object.critically_wounded

deadbody_can_take

ts
deadbody_can_take: MockedFunction<(value: boolean) => void>;

Allow or block taking items from this dead body.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

value

Whether taking items is allowed.

Implementation of

ts
game_object.deadbody_can_take

deadbody_can_take_status

ts
deadbody_can_take_status: MockedFunction<() => boolean>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Whether items can be taken from this dead body.

Implementation of

ts
game_object.deadbody_can_take_status

deadbody_closed

ts
deadbody_closed: MockedFunction<(value: boolean) => void>;

Mark this dead body inventory as opened or closed.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

value

Whether the dead body is closed.

Implementation of

ts
game_object.deadbody_closed

deadbody_closed_status

ts
deadbody_closed_status: MockedFunction<() => boolean>;

Check whether dead body inventory is closed.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Whether looting is closed.

Implementation of

ts
game_object.deadbody_closed_status

death_sound_enabled

ts
death_sound_enabled: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether death sounds are enabled.

Implementation of

ts
game_object.death_sound_enabled

death_time

ts
death_time: MockedFunction<() => number>;

Get object death time.

Returns

Death time.

Implementation of

ts
game_object.death_time

debug_planner

ts
debug_planner: Mock<UnknownFunction>;

Sets provided planner as debugged for stalker object. As result, when console command ai_dbg_stalker on is toggled, GOAP state of planner is displayed. Requires mixed build engine.

Param

planner

Action planner to show in stalker stats when debugging is enabled.

Implementation of

ts
game_object.debug_planner

detach_vehicle

ts
detach_vehicle: MockedFunction<(force: boolean) => void>;

Detach actor from the current vehicle or holder.

Since

OpenXRay 2015-06-16, 0fe21c14

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

force

Whether detach should be forced.

Implementation of

ts
game_object.detach_vehicle

detail_path_type

ts
detail_path_type: MockedFunction<() => TXR_detail_path_type>;

Get current detail path type used by the object's movement manager.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::detail_path_type.

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects log an engine script error and return move.line. In the verified xray source, the wrapper also returns move.line for stalkers instead of reading the current movement manager value.

Returns

Detail path type id.

Implementation of

ts
game_object.detail_path_type

direction

ts
direction: Mock<() => vector>;

Get object facing direction.

Remarks

Returns the current engine transform direction. For AI-facing goals, prefer sight or movement APIs.

Returns

Direction vector.

Implementation of

ts
game_object.direction

disable_anomaly

ts
disable_anomaly: Mock<UnknownFunction>;

Disable this anomaly object.

Remarks

Requires this object to be a custom zone. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.disable_anomaly

disable_hit_marks

ts
disable_hit_marks: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Whether hit marks are disabled.

Implementation of

ts
game_object.disable_hit_marks

disable_info_portion

ts
disable_info_portion: Mock<(it: string) => boolean>;

Remove an info portion from this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

info_portion

Info portion id.

Returns

Whether the info portion was removed.

Implementation of

ts
game_object.disable_info_portion

disable_inv_upgrade

ts
disable_inv_upgrade: MockedFunction<() => void>;

Disable inventory upgrades for this object.

Implementation of

ts
game_object.disable_inv_upgrade

disable_show_hide_sounds

ts
disable_show_hide_sounds: MockedFunction<(value: boolean) => void>;

Enable or disable weapon show, hide and reload sounds for this inventory owner.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

value

Whether those sounds should play.

Implementation of

ts
game_object.disable_show_hide_sounds

disable_talk

ts
disable_talk: Mock<UnknownFunction>;

Disable actor dialog with this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.disable_talk

disable_trade

ts
disable_trade: Mock<UnknownFunction>;

Disable trade with this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.disable_trade

disabledInventoryUpgrades

ts
disabledInventoryUpgrades: Set<string>;

dont_has_info

ts
dont_has_info: Mock<(it: string) => boolean>;

Check that this object does not have an info portion.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

info_portion

Info portion id.

Returns

Whether the info portion is absent.

Implementation of

ts
game_object.dont_has_info

drop_item

ts
drop_item: Mock<(it: game_object) => void>;

Drop item from inventory.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

item

Game object to drop.

Implementation of

ts
game_object.drop_item

drop_item_and_teleport

ts
drop_item_and_teleport: Mock<UnknownFunction>;

Drop an item and teleport it to a position.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

item

Item to drop.

Param

position

Target position.

Implementation of

ts
game_object.drop_item_and_teleport

eat

ts
eat: Mock<UnknownFunction>;

Consume an inventory item.

Remarks

Requires this object to be an eatable inventory item. Other object types log a script error and return a default value or do nothing.

Param

item

Item to eat or use.

Implementation of

ts
game_object.eat

enable_anomaly

ts
enable_anomaly: Mock<UnknownFunction>;

Enable this anomaly zone.

Remarks

Requires this object to be a custom zone. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.enable_anomaly

enable_attachable_item

ts
enable_attachable_item: Mock<UnknownFunction>;

Method for inventory items to set them enabled / disabled for stalkers. As result, medkit or detector can be activated by stalker.

Remarks

Requires this object to be an attachable item. Other object types log a script error and return a default value or do nothing.

Param

is_enabled

Whether item should be enabled for usage by owning object.

Implementation of

ts
game_object.enable_attachable_item

enable_inv_upgrade

ts
enable_inv_upgrade: MockedFunction<() => void>;

Enable inventory upgrades for this object.

Implementation of

ts
game_object.enable_inv_upgrade

enable_level_changer

ts
enable_level_changer: Mock<UnknownFunction>;

Switch client level changed enabled state.

Remarks

Requires this object to be a level changer. Other object types do nothing.

Param

is_enabled

Whether level changer should be enabled.

Implementation of

ts
game_object.enable_level_changer

enable_memory_object

ts
enable_memory_object: MockedFunction<(object: game_object, is_enabled: boolean) => void>;

Enable or disable memory tracking for an object.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

object

Object to update.

Param

is_enabled

Whether memory object is enabled.

Implementation of

ts
game_object.enable_memory_object

enable_night_vision

ts
enable_night_vision: Mock<UnknownFunction>;

Enable or disable night vision on actor equipment.

Remarks

Requires this object to be a torch item. Other object types log a script error and return a default value or do nothing.

Param

is_enabled

Whether night vision is enabled.

Implementation of

ts
game_object.enable_night_vision

enable_talk

ts
enable_talk: Mock<UnknownFunction>;

Enable actor talk interaction with this inventory owner.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.enable_talk

enable_torch

ts
enable_torch: Mock<UnknownFunction>;

Enable or disable torch.

Remarks

Requires this object to be a torch item. Other object types log a script error and return a default value or do nothing.

Param

is_enabled

Whether torch is enabled.

Implementation of

ts
game_object.enable_torch

enable_trade

ts
enable_trade: Mock<UnknownFunction>;

Enable actor trade interaction with this inventory owner.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.enable_trade

enable_vision

ts
enable_vision: MockedFunction<(value: boolean) => void>;

Enable or disable visual memory for this monster.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

value

Whether vision is enabled.

Implementation of

ts
game_object.enable_vision

explode

ts
explode: Mock<UnknownFunction>;

Trigger object explosion.

Remarks

Requires an explosive object or object with an explosive component. The id is passed to native explosion logic and is not validated by TypeScript.

Param

id

Explosion id or initiator id.

Implementation of

ts
game_object.explode

external_sound_start

ts
external_sound_start: MockedFunction<(sound: string) => void>;

Start an external object sound.

Remarks

Requires this object to be a trader-capable inventory owner. Other object types log a script error and return a default value or do nothing.

Param

sound

Sound name.

Implementation of

ts
game_object.external_sound_start

external_sound_stop

ts
external_sound_stop: MockedFunction<() => void>;

Stop the current external trader sound.

Remarks

Requires this object to be a trader-capable inventory owner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.external_sound_stop

extrapolate_length

ts
extrapolate_length: MockedFunction<{
  (): number;
  (value: number): void;
}>;

Returns

Movement path extrapolation length.

Implementation of

ts
game_object.extrapolate_length

fake_death_fall_down

ts
fake_death_fall_down: MockedFunction<() => boolean>;

Remarks

Requires this object to be a zombie. Other object types log a script error and return a default value or do nothing.

Returns

Whether this zombie should fall down in fake-death state.

Implementation of

ts
game_object.fake_death_fall_down

fake_death_stand_up

ts
fake_death_stand_up: MockedFunction<() => void>;

Force a fake-dead monster to stand up.

Remarks

Requires this object to be a zombie. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.fake_death_stand_up

find_best_cover

ts
find_best_cover: MockedFunction<(position: vector) => cover_point>;

Find the best cover from a threat position.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

position

Threat position.

Returns

Cover point.

Implementation of

ts
game_object.find_best_cover

force_set_goodwill

ts
force_set_goodwill: Mock<UnknownFunction>;

Set goodwill toward another object without applying a delta.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

goodwill

Goodwill value.

Param

to_object

Target object.

Implementation of

ts
game_object.force_set_goodwill

force_set_position

ts
force_set_position: MockedFunction<(position: vector, activate: boolean) => void>;

Move object with a physics shell to a position immediately.

Since

OpenXRay 2015-07-07, 6e703b4c

Remarks

Requires this object to be a physics-shell holder. Objects without a shell return or log a script error. When activate is true, the engine activates the physics shell before forcing the transform.

Param

position

Target position.

Param

activate

Whether to activate the physics shell before moving it.

Implementation of

ts
game_object.force_set_position

force_stand_sleep_animation

ts
force_stand_sleep_animation: MockedFunction<(index: number) => void>;

Force a bloodsucker stand/sleep animation variant.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Param

index

Animation index.

Implementation of

ts
game_object.force_stand_sleep_animation

force_visibility_state

ts
force_visibility_state: MockedFunction<(state: TXR_bloodsucker_visibility_state) => void>;

For bloodsuckers specifically set current visibility state.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.force_visibility_state

fov

ts
fov: Mock<() => number>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Current object field of view.

Implementation of

ts
game_object.fov

game_vertex_id

ts
game_vertex_id: Mock<() => number>;

Get current game graph vertex id.

Returns

Game vertex id.

Implementation of

ts
game_object.game_vertex_id

general_goodwill

ts
general_goodwill: Mock<(to: game_object) => number>;

Return formula: personal_goodwill + reputation_goodwill + rank_goodwill + community_goodwill + community_to_community.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

target

Target client object.

Returns

Goodwill level from object to target.

Implementation of

ts
game_object.general_goodwill

get_actor_jump_speed

ts
get_actor_jump_speed: MockedFunction<() => number>;

Get actor jump speed.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Actor jump speed.

Implementation of

ts
game_object.get_actor_jump_speed

get_actor_max_walk_weight

ts
get_actor_max_walk_weight: MockedFunction<() => number>;

Get actor maximum walk weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Actor maximum walk weight.

Implementation of

ts
game_object.get_actor_max_walk_weight

get_actor_max_weight

ts
get_actor_max_weight: MockedFunction<() => number>;

Get actor maximum carry weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Actor maximum carry weight.

Implementation of

ts
game_object.get_actor_max_weight

get_actor_relation_flags

ts
get_actor_relation_flags: MockedFunction<() => flags32>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Actor relation flags stored for this character.

Implementation of

ts
game_object.get_actor_relation_flags

get_actor_run_coef

ts
get_actor_run_coef: MockedFunction<() => number>;

Get actor run speed coefficient.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Actor run speed coefficient.

Implementation of

ts
game_object.get_actor_run_coef

get_actor_runback_coef

ts
get_actor_runback_coef: MockedFunction<() => number>;

Get actor backward run speed coefficient.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Actor backward run speed coefficient.

Implementation of

ts
game_object.get_actor_runback_coef

get_actor_sprint_koef

ts
get_actor_sprint_koef: MockedFunction<() => number>;

Get actor sprint speed coefficient.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Actor sprint speed coefficient.

Implementation of

ts
game_object.get_actor_sprint_koef

get_additional_max_walk_weight

ts
get_additional_max_walk_weight: MockedFunction<() => number>;

Get additional maximum walk weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Additional maximum walk weight.

Implementation of

ts
game_object.get_additional_max_walk_weight

get_additional_max_weight

ts
get_additional_max_weight: MockedFunction<() => number>;

Get additional maximum carry weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Additional maximum carry weight.

Implementation of

ts
game_object.get_additional_max_weight

get_ammo_count_for_type

ts
get_ammo_count_for_type: MockedFunction<(type: number) => number>;

Get inventory ammo count for a weapon ammo type.

Since

OpenXRay 2016-02-25, 46c1c78c

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

type

Ammo type index.

Returns

Matching ammo count.

Implementation of

ts
game_object.get_ammo_count_for_type

get_ammo_in_magazine

ts
get_ammo_in_magazine: Mock<() => number>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Ammo count currently loaded in this weapon magazine.

Implementation of

ts
game_object.get_ammo_in_magazine

get_ammo_total

ts
get_ammo_total: MockedFunction<() => number>;

Get total suitable ammo count.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Ammo count.

Implementation of

ts
game_object.get_ammo_total

get_ammo_type

ts
get_ammo_type: MockedFunction<() => number>;

Get active ammo type.

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Ammo type id.

Implementation of

ts
game_object.get_ammo_type

get_anomaly_power

ts
get_anomaly_power: MockedFunction<() => number>;

Remarks

Requires this object to be a custom zone. Other object types log a script error and return a default value or do nothing.

Returns

Current anomaly power.

Implementation of

ts
game_object.get_anomaly_power

get_artefact

ts
get_artefact: Mock<() => null>;

Cast this object to an artefact.

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Returns

Artefact object, or null when this object is not an artefact.

Implementation of

ts
game_object.get_artefact

get_artefact_bleeding

ts
get_artefact_bleeding: MockedFunction<() => number>;

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Returns

Artefact bleeding restore rate.

Implementation of

ts
game_object.get_artefact_bleeding

get_artefact_health

ts
get_artefact_health: MockedFunction<() => number>;

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Returns

Artefact health restore rate.

Implementation of

ts
game_object.get_artefact_health

get_artefact_power

ts
get_artefact_power: MockedFunction<() => number>;

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Returns

Artefact power restore rate.

Implementation of

ts
game_object.get_artefact_power

get_artefact_radiation

ts
get_artefact_radiation: MockedFunction<() => number>;

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Returns

Artefact radiation restore rate.

Implementation of

ts
game_object.get_artefact_radiation

get_artefact_satiety

ts
get_artefact_satiety: MockedFunction<() => number>;

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Returns

Artefact satiety restore rate.

Implementation of

ts
game_object.get_artefact_satiety

get_attached_vehicle

ts
get_attached_vehicle: MockedFunction<() => Nullable<game_object>>;

Get vehicle currently attached to the actor.

Since

OpenXRay 2015-07-07, 6e703b4c

Remarks

Requires this object to be the actor. Other object types log a script error or return null.

Returns

Vehicle currently attached to the actor, or null.

Implementation of

ts
game_object.get_attached_vehicle

get_bone_id

ts
get_bone_id: Mock<() => number>;

Get model bone id by name.

Remarks

Requires this object to have a renderable visual. Objects without a visual can log an engine error or return a default value.

Param

bone

Bone name.

Returns

Bone id.

Implementation of

ts
game_object.get_bone_id

get_campfire

ts
get_campfire: Mock<() => null>;

Cast this object to a campfire.

Remarks

Requires this object to be a campfire zone. Other object types log a script error.

Returns

Campfire object, or null when this object is not a campfire.

Implementation of

ts
game_object.get_campfire

get_car

ts
get_car: Mock<() => CCar>;

Remarks

Requires this object to be a car. Other object types log a script error.

Returns

This object as a car.

Implementation of

ts
game_object.get_car

get_corpse

ts
get_corpse: MockedFunction<() => Nullable<game_object>>;

Get current corpse selected by this monster.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::GetCorpse.

Remarks

Requires this object to be a CCustomMonster. The binding ignores destroyed corpse objects and returns null when no usable corpse is selected.

Returns

Corpse selected by this monster, or null.

Implementation of

ts
game_object.get_corpse

get_current_direction

ts
get_current_direction: MockedFunction<() => vector>;

Get current movement direction.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Direction vector.

Implementation of

ts
game_object.get_current_direction

get_current_holder

ts
get_current_holder: MockedFunction<() => Nullable<holder>>;

Returns

Current holder used by the actor, or null.

Implementation of

ts
game_object.get_current_holder

get_current_outfit

ts
get_current_outfit: MockedFunction<() => Nullable<game_object>>;

Get currently equipped outfit.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::GetCurrentOutfit.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return null.

Returns

Currently equipped outfit, or null when none is equipped.

Implementation of

ts
game_object.get_current_outfit

get_current_outfit_protection

ts
get_current_outfit_protection: MockedFunction<(hit_type: number) => number>;

Get protection value from the currently equipped outfit.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

hit_type

Hit type id.

Returns

Protection value.

Implementation of

ts
game_object.get_current_outfit_protection

get_current_point_index

ts
get_current_point_index: Mock<() => number>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Current patrol path point index.

Implementation of

ts
game_object.get_current_point_index

get_dest_smart_cover

ts
get_dest_smart_cover: MockedFunction<() => cover_point>;

Get destination smart cover.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Returns

Cover point.

Implementation of

ts
game_object.get_dest_smart_cover

get_dest_smart_cover_name

ts
get_dest_smart_cover_name: MockedFunction<() => Nullable<string>>;

Get destination smart cover name.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Returns

Cover name, or null.

Implementation of

ts
game_object.get_dest_smart_cover_name

get_enemy

ts
get_enemy: Mock<() => null>;

Get current enemy selected by this monster.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::GetEnemy.

Remarks

Requires this object to be an alive CCustomMonster. The binding ignores destroyed enemy objects and returns null when the monster is dead, has no current enemy, or is not a monster.

Returns

Current enemy object, or null.

Implementation of

ts
game_object.get_enemy

get_enemy_strength

ts
get_enemy_strength: MockedFunction<() => number>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Current enemy strength estimate.

Implementation of

ts
game_object.get_enemy_strength

get_force_anti_aim

ts
get_force_anti_aim: Mock<() => boolean>;

Remarks

Requires this object to be a base monster. Other object types log a script error and return a default value or do nothing.

Returns

Whether this monster is forced to use anti-aim behavior.

Implementation of

ts
game_object.get_force_anti_aim

get_hanging_lamp

ts
get_hanging_lamp: Mock<() => hanging_lamp>;

Cast this object to a hanging lamp.

Remarks

Requires this object to be a hanging lamp. Other object types log a script error.

Returns

Hanging lamp object.

Implementation of

ts
game_object.get_hanging_lamp

get_helicopter

ts
get_helicopter: Mock<() => CHelicopter>;

Remarks

Requires this object to be a helicopter. Other object types log a script error.

Returns

This object as a helicopter.

Implementation of

ts
game_object.get_helicopter

get_holder_class

ts
get_holder_class: MockedFunction<() => holder>;

Cast this object to a holder.

Remarks

Requires this object to be a holder object. Other object types log a script error or return null.

Returns

Holder object.

Implementation of

ts
game_object.get_holder_class

get_info_time

ts
get_info_time: MockedFunction<(info: string) => CTime>;

Get time when an info portion was received.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

info

Info portion id.

Returns

Game time.

Implementation of

ts
game_object.get_info_time

get_luminocity

ts
get_luminocity: MockedFunction<() => number>;

Get object luminocity.

Since

OpenXRay 2015-07-07, 6e703b4c

Remarks

Requires this object to have a renderable visual. Objects without a visual can log an engine error or return a default value.

Returns

Object luminocity.

Implementation of

ts
game_object.get_luminocity

get_luminocity_hemi

ts
get_luminocity_hemi: MockedFunction<() => number>;

Get object hemisphere luminocity.

Since

OpenXRay 2015-07-07, 6e703b4c

Remarks

Requires this object to have a renderable visual. Objects without a visual can log an engine error or return a default value.

Returns

Hemispheric luminocity for this object.

Implementation of

ts
game_object.get_luminocity_hemi

get_main_weapon_type

ts
get_main_weapon_type: MockedFunction<() => number>;

Get weapon main type.

Since

OpenXRay 2016-02-25, 46c1c78c

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Main weapon type id.

Implementation of

ts
game_object.get_main_weapon_type

get_max_uses

ts
get_max_uses: MockedFunction<() => number>;

Get maximum item uses.

Since

OpenXRay 2015-08-27, 7840b0fe

Remarks

Requires this object to be an eatable inventory item. Other object types log a script error and return a default value or do nothing.

Returns

Maximum uses.

Implementation of

ts
game_object.get_max_uses

get_monster_hit_info

ts
get_monster_hit_info: Mock<() => MonsterHitInfo>;

Get latest monster hit information.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Monster hit info.

Implementation of

ts
game_object.get_monster_hit_info

get_movement_speed

ts
get_movement_speed: Mock<() => vector>;

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Returns

Current movement speed vector.

Implementation of

ts
game_object.get_movement_speed

get_physics_object

ts
get_physics_object: Mock<() => null>;

Get physics object wrapper.

Remarks

Requires this object to own a physics shell or physics holder. Other object types return null or do nothing.

Returns

Physics object, or null when this object is not a physics object.

Implementation of

ts
game_object.get_physics_object

get_physics_shell

ts
get_physics_shell: Mock<() => null>;

Remarks

Requires this object to own a physics shell or physics holder. Other object types return null or do nothing.

Returns

Physics shell for this object, or null.

Implementation of

ts
game_object.get_physics_shell

get_remaining_uses

ts
get_remaining_uses: MockedFunction<() => number>;

Get remaining item uses.

Since

OpenXRay 2015-08-27, 7840b0fe

Remarks

Requires this object to be an eatable inventory item. Other object types log a script error and return a default value or do nothing.

Returns

Remaining uses.

Implementation of

ts
game_object.get_remaining_uses

get_restrictor_type

ts
get_restrictor_type: MockedFunction<() => TXR_restrictor_type | 255>;

Remarks

Requires this object to be a space restrictor. Other object types return 255.

Returns

Space-restrictor category, or 255 when this object is not a space restrictor.

Implementation of

ts
game_object.get_restrictor_type

get_script

ts
get_script: Mock<() => boolean>;

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Returns

Whether object is controlled by lua script.

Implementation of

ts
game_object.get_script

get_script_name

ts
get_script_name: Mock<() => string>;

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Returns

Name of lua script controlling monster object.

Implementation of

ts
game_object.get_script_name

get_smart_cover_description

ts
get_smart_cover_description: MockedFunction<() => string>;

Get current smart cover description.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Smart cover description.

Implementation of

ts
game_object.get_smart_cover_description

get_sound_info

ts
get_sound_info: MockedFunction<() => SoundInfo>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Last known monster sound info.

Implementation of

ts
game_object.get_sound_info

get_spatial_type

ts
get_spatial_type: MockedFunction<() => number>;

Get object spatial type flags.

Since

OpenXRay 2016-05-31, 15edbfd9

Remarks

Requires this object to be registered in spatial object logic. Other object types can log an engine error or return a default value.

Returns

Spatial registration type mask.

Implementation of

ts
game_object.get_spatial_type

get_start_dialog

ts
get_start_dialog: MockedFunction<() => void>;

Get current start dialog id.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.get_start_dialog

get_state

ts
get_state: MockedFunction<() => number>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Current HUD item state.

Implementation of

ts
game_object.get_state

get_task

ts
get_task: Mock<() => null>;

Get task by id.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

task_id

Task id.

Param

only_in_process

Whether to return only active tasks.

Returns

Task object, or null.

Implementation of

ts
game_object.get_task

get_task_state

ts
get_task_state: MockedFunction<(task_id: string) => TXR_TaskState>;

Get task state by id.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

task_id

Task id.

Returns

Task state id, or task.task_dummy when this object is not an inventory owner or the task is missing.

Implementation of

ts
game_object.get_task_state

get_total_weight

ts
get_total_weight: MockedFunction<() => number>;

Get actor total carried weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Total inventory weight for this inventory owner.

Implementation of

ts
game_object.get_total_weight

get_visibility_state

ts
get_visibility_state: MockedFunction<() => number>;

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Returns

Current bloodsucker visibility state.

Implementation of

ts
game_object.get_visibility_state

get_visual_name

ts
get_visual_name: MockedFunction<<T>() => T>;

Returns

Visual name assigned to this object.

Implementation of

ts
game_object.get_visual_name

get_weapon_substate

ts
get_weapon_substate: MockedFunction<() => number>;

Get weapon substate.

Since

OpenXRay 2016-02-25, 46c1c78c

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Current weapon substate.

Implementation of

ts
game_object.get_weapon_substate

get_weapon_type

ts
get_weapon_type: MockedFunction<() => number>;

Get weapon type.

Since

OpenXRay 2016-02-25, 46c1c78c

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Weapon type id.

Implementation of

ts
game_object.get_weapon_type

give_game_news

ts
give_game_news: Mock<UnknownFunction>;

Display in-game UI notification.

Since

OpenXRay 2023-04-17, a9d0a11a, PR #392

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

title

Notification title.

Param

text

Notification text.

Param

icon_texture

Notification icon texture.

Param

delay

Delay before show notification.

Param

show_time

Time to show notification before hiding it.

Param

type

Type of the notification (eNews = 0, eTalk = 1).

Implementation of

ts
game_object.give_game_news

give_info_portion

ts
give_info_portion: Mock<(it: string) => boolean>;

Add an info portion to this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

info_portion

Info portion id.

Returns

Whether the info portion was added.

Implementation of

ts
game_object.give_info_portion

give_money

ts
give_money: Mock<(value: number) => number>;

Add money to this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

amount

Money amount.

Implementation of

ts
game_object.give_money

give_talk_message

ts
give_talk_message: MockedFunction<(title: string, text: string, icon: string) => void>;

Show a talk message.

Since

OpenXRay 2019-06-27, 1ea203d0, PR #392

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

title

Message title.

Param

text

Message text.

Param

icon

Message icon.

Implementation of

ts
game_object.give_talk_message

give_talk_message2

ts
give_talk_message2: Mock<UnknownFunction>;

Show talk dialog message with icon.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

title

Title of the message.

Param

text

Text of the message.

Param

icon_texture_name

Icon to display in message image.

Param

selector

Path in form XML to message template.

Implementation of

ts
game_object.give_talk_message2

give_task

ts
give_task: Mock<UnknownFunction>;

Give game task for an object, usually it is actor object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

task

Task object to give.

Param

time_to_complete

Time allowed to complete the task.

Param

check_existing

Whether an existing task should be reused.

Param

timer_ttl

Timer lifetime.

Implementation of

ts
game_object.give_task

goodwill

ts
goodwill: MockedFunction<(target: game_object) => number>;

Returns level of goodwill stored for an object. No strict formulas, just get actual value.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

target

Target client object.

Returns

Goodwill level to target object.

Implementation of

ts
game_object.goodwill

group

ts
group: Mock<() => number>;

Get object group id.

Returns

Group id.

Implementation of

ts
game_object.group

group_throw_time_interval

ts
group_throw_time_interval: MockedFunction<{
  (): number;
  (interval: number): void;
}>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Current delay between group grenade throws.

Implementation of

ts
game_object.group_throw_time_interval

has_ammo_type

ts
has_ammo_type: MockedFunction<(type: string) => boolean>;

Check whether weapon supports an ammo type.

Since

OpenXRay 2016-02-25, 46c1c78c

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

type

Ammo section.

Returns

Whether ammo type is supported.

Implementation of

ts
game_object.has_ammo_type

has_info

ts
has_info: Mock<(it: string) => boolean>;

Check whether this object has an info portion.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

info_portion

Info portion id.

Returns

Whether the info portion is present.

Implementation of

ts
game_object.has_info

has_upgrade

ts
has_upgrade: MockedFunction<(upgrade_section: string) => boolean>;

Param

upgrade_section

Section of upgrade to check.

Returns

Whether upgrade is installed.

Implementation of

ts
game_object.has_upgrade

has_upgrade_group

ts
has_upgrade_group: MockedFunction<(upgrade_group_section: string) => boolean>;

Check whether an upgrade group is installed.

Since

OpenXRay 2023-10-19, a6016f10, PR #1463

Param

upgrade_group_section

Section of upgrade group to check.

Returns

Whether upgrade group is installed.

Implementation of

ts
game_object.has_upgrade_group

has_upgrade_group_by_upgrade_id

ts
has_upgrade_group_by_upgrade_id: MockedFunction<(upgrade_section: string) => boolean>;

Check whether an upgrade's parent group is installed.

Since

OpenXRay 2023-10-19, a6016f10, PR #1463

Param

upgrade_section

Section of upgrade to check parent group.

Returns

Whether upgrade parent group is installed.

Implementation of

ts
game_object.has_upgrade_group_by_upgrade_id

head_orientation

ts
head_orientation: MockedFunction<() => vector>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Current head orientation for this creature.

Implementation of

ts
game_object.head_orientation

hide_weapon

ts
hide_weapon: MockedFunction<() => void>;

Hide the actor weapon model.

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Implementation of

ts
game_object.hide_weapon

hit

ts
hit: Mock<UnknownFunction>;

Apply a hit descriptor to this object.

Param

hit

Hit descriptor.

Implementation of

ts
game_object.hit

id

ts
id: Mock<() => number>;

Get engine object id.

Returns

Runtime object id.

Implementation of

ts
game_object.id

idle_max_time

ts
idle_max_time: MockedFunction<{
  (): number;
  (time: number): void;
}>;

Get maximum idle time.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Returns

Idle time in milliseconds.

Implementation of

ts
game_object.idle_max_time

idle_min_time

ts
idle_min_time: MockedFunction<{
  (): number;
  (value: number): void;
}>;

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Returns

Minimum idle time for smart-cover animation.

Implementation of

ts
game_object.idle_min_time

ignore_monster_threshold

ts
ignore_monster_threshold: MockedFunction<{
  (): number;
  (threshold: number): void;
}>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Monster ignore threshold used by this stalker's enemy memory.

Implementation of

ts
game_object.ignore_monster_threshold

in_current_loophole_fov

ts
in_current_loophole_fov: Mock<() => boolean>;

Check whether a position is inside the current loophole field of view.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Param

position

Position to test.

Returns

Whether position is inside field of view.

Implementation of

ts
game_object.in_current_loophole_fov

in_current_loophole_range

ts
in_current_loophole_range: MockedFunction<(position: vector) => boolean>;

Check whether a point is in range of the current smart-cover loophole.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Param

position

Point to test.

Returns

Whether the point is in current loophole range.

Implementation of

ts
game_object.in_current_loophole_range

in_loophole_fov

ts
in_loophole_fov: MockedFunction<(cover_name: string, loophole_name: string, position: vector) => boolean>;

Check whether a position is inside a named loophole field of view.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Param

cover_name

Smart cover name.

Param

loophole_name

Loophole name.

Param

position

Position to test.

Returns

Whether position is inside field of view.

Implementation of

ts
game_object.in_loophole_fov

in_loophole_range

ts
in_loophole_range: MockedFunction<(cover_id: string, loophole_id: string, position: vector) => boolean>;

Check whether a point is in range of a smart-cover loophole.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Param

cover_id

Smart-cover id.

Param

loophole_id

Loophole id.

Param

position

Point to test.

Returns

Whether the point is in loophole range.

Implementation of

ts
game_object.in_loophole_range

in_restrictions

ts
in_restrictions: Mock<() => string>;

Remarks

Requires an object with AI path restriction support.

Returns

Active input restriction names.

Implementation of

ts
game_object.in_restrictions

in_smart_cover

ts
in_smart_cover: Mock<() => boolean>;

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Returns

Whether this stalker is currently in a smart cover.

Implementation of

ts
game_object.in_smart_cover

inactualize_game_path

ts
inactualize_game_path: MockedFunction<() => void>;

Mark game path cache as outdated.

Implementation of

ts
game_object.inactualize_game_path

inactualize_level_path

ts
inactualize_level_path: MockedFunction<() => void>;

Mark level path cache as outdated.

Implementation of

ts
game_object.inactualize_level_path

inactualize_patrol_path

ts
inactualize_patrol_path: Mock<UnknownFunction>;

Mark patrol path cache as outdated.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.inactualize_patrol_path

info_add

ts
info_add: Mock<(it: string) => boolean>;

Available only in debug mode. Sets information for game object for debug.

Remarks

Intended for engine/debug overlays. Release builds may ignore it or compile out the visible effect.

Implementation of

ts
game_object.info_add

info_clear

ts
info_clear: Mock<() => void>;

Reset debugging information about object. Available only for debug builds.

Implementation of

ts
game_object.info_clear

inside

ts
inside: Mock<() => boolean>;

Check whether a position is inside this space restrictor.

Param

position

Position to test.

Returns

Whether the position is inside.

Implementation of

ts
game_object.inside

install_upgrade

ts
install_upgrade: MockedFunction<(upgrade_section: string) => boolean>;

Install an upgrade section.

Since

OpenXRay 2023-10-19, a6016f10, PR #1463

Param

upgrade_section

Section of upgrade to install.

Returns

Whether upgrade is installed successfully or not.

Implementation of

ts
game_object.install_upgrade

inv_box_can_take

ts
inv_box_can_take: MockedFunction<(value: boolean) => boolean>;

Set whether items can be taken from this inventory box.

Remarks

Requires this object to be an inventory box. Other object types log a script error and return a default value or do nothing.

Param

value

Whether taking items is allowed.

Returns

New take permission state.

Implementation of

ts
game_object.inv_box_can_take

inv_box_can_take_status

ts
inv_box_can_take_status: MockedFunction<() => boolean>;

Remarks

Requires this object to be an inventory box. Other object types log a script error and return a default value or do nothing.

Returns

Whether items can be taken from this inventory box.

Implementation of

ts
game_object.inv_box_can_take_status

inv_box_closed

ts
inv_box_closed: MockedFunction<(is_closed: boolean, reason: string) => boolean>;

Close or open this inventory box.

Remarks

Requires this object to be an inventory box. Other object types log a script error and return a default value or do nothing.

Param

is_closed

Whether the box is closed.

Param

reason

Script reason stored for the close state.

Returns

Whether the close state was applied.

Implementation of

ts
game_object.inv_box_closed

inv_box_closed_status

ts
inv_box_closed_status: MockedFunction<() => boolean>;

Remarks

Requires this object to be an inventory box. Other object types log a script error and return a default value or do nothing.

Returns

Whether this inventory box is closed.

Implementation of

ts
game_object.inv_box_closed_status

inventory_for_each

ts
inventory_for_each: MockedFunction<(cb: (this: void) => void) => void>;

Iterate inventory items.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

cb

Callback called for each item.

Implementation of

ts
game_object.inventory_for_each

invulnerable

ts
invulnerable: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Returns

Whether this monster ignores damage.

Implementation of

ts
game_object.invulnerable

is_active_task

ts
is_active_task: MockedFunction<(task: CGameTask) => boolean>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

task

Task object to check.

Returns

Whether this task is active.

Implementation of

ts
game_object.is_active_task

is_actor

ts
is_actor: MockedFunction<() => boolean>;

Check whether this object is the actor.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is the actor.

Implementation of

ts
game_object.is_actor

is_ammo

ts
is_ammo: MockedFunction<() => boolean>;

Check whether this object is ammo.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is ammo.

Implementation of

ts
game_object.is_ammo

is_anomaly

ts
is_anomaly: MockedFunction<() => boolean>;

Check whether this object is an anomaly.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is an anomaly zone.

Implementation of

ts
game_object.is_anomaly

is_artefact

ts
is_artefact: MockedFunction<() => boolean>;

Check whether this object is an artefact.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is an artefact.

Implementation of

ts
game_object.is_artefact

is_body_turning

ts
is_body_turning: MockedFunction<() => boolean>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether the object is currently turning its body.

Implementation of

ts
game_object.is_body_turning

is_custom_monster

ts
is_custom_monster: MockedFunction<() => boolean>;

Check whether this object is a custom monster.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a custom monster.

Implementation of

ts
game_object.is_custom_monster

is_door_blocked_by_npc

ts
is_door_blocked_by_npc: Mock<() => boolean>;

Check whether a door is blocked by an NPC.

Remarks

Requires this object to be a door object managed by NPC door logic. Other object types do nothing or report an engine script error.

Returns

Whether a door is blocked.

Implementation of

ts
game_object.is_door_blocked_by_npc

is_door_locked_for_npc

ts
is_door_locked_for_npc: MockedFunction<() => boolean>;

Remarks

Requires this object to be a door object managed by NPC door logic. Other object types do nothing or report an engine script error.

Returns

Whether this door is locked for NPC navigation.

Implementation of

ts
game_object.is_door_locked_for_npc

is_entity_alive

ts
is_entity_alive: MockedFunction<() => boolean>;

Check whether this object is an alive entity.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is an alive entity.

Implementation of

ts
game_object.is_entity_alive

is_grenade_launcher

ts
is_grenade_launcher: MockedFunction<() => boolean>;

Check whether this object is a grenade launcher addon.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a grenade launcher addon.

Implementation of

ts
game_object.is_grenade_launcher

is_hud_item

ts
is_hud_item: MockedFunction<() => boolean>;

Check whether this object is a HUD item.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a HUD item.

Implementation of

ts
game_object.is_hud_item

is_inv_box_empty

ts
is_inv_box_empty: Mock<() => boolean>;

Remarks

Requires this object to be an inventory box. Other object types log a script error and return a default value or do nothing.

Returns

Whether this inventory box has no items.

Implementation of

ts
game_object.is_inv_box_empty

is_inv_upgrade_enabled

ts
is_inv_upgrade_enabled: MockedFunction<() => boolean>;

Returns

Whether inventory upgrade interaction is enabled.

Implementation of

ts
game_object.is_inv_upgrade_enabled

is_inventory_box

ts
is_inventory_box: MockedFunction<() => boolean>;

Check whether this object is an inventory box.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is an inventory box.

Implementation of

ts
game_object.is_inventory_box

is_inventory_item

ts
is_inventory_item: MockedFunction<() => boolean>;

Check whether this object is an inventory item.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is an inventory item.

Implementation of

ts
game_object.is_inventory_item

is_inventory_owner

ts
is_inventory_owner: MockedFunction<() => boolean>;

Check whether this object is an inventory owner.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is an inventory owner.

Implementation of

ts
game_object.is_inventory_owner

is_level_changer_enabled

ts
is_level_changer_enabled: MockedFunction<() => boolean>;

Remarks

Requires this object to be a level changer. Other object types do nothing.

Returns

Whether this level changer is enabled.

Implementation of

ts
game_object.is_level_changer_enabled

is_monster

ts
is_monster: MockedFunction<() => boolean>;

Check whether this object is a monster.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a monster.

Implementation of

ts
game_object.is_monster

is_on_belt

ts
is_on_belt: MockedFunction<(object: game_object) => boolean>;

Check whether an item is on belt.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

object

Item object.

Returns

Whether item is on belt.

Implementation of

ts
game_object.is_on_belt

is_outfit

ts
is_outfit: MockedFunction<() => boolean>;

Check whether this object is an outfit.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is an outfit.

Implementation of

ts
game_object.is_outfit

is_scope

ts
is_scope: MockedFunction<() => boolean>;

Check whether this object is a scope addon.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a scope addon.

Implementation of

ts
game_object.is_scope

is_silencer

ts
is_silencer: MockedFunction<() => boolean>;

Check whether this object is a silencer addon.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a silencer addon.

Implementation of

ts
game_object.is_silencer

is_space_restrictor

ts
is_space_restrictor: MockedFunction<() => boolean>;

Check whether this object is a space restrictor.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a space restrictor.

Implementation of

ts
game_object.is_space_restrictor

is_stalker

ts
is_stalker: MockedFunction<() => boolean>;

Check whether this object is a stalker.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a stalker.

Implementation of

ts
game_object.is_stalker

is_talk_enabled

ts
is_talk_enabled: Mock<() => boolean>;

Check whether actor dialog is enabled.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Whether talking is enabled.

Implementation of

ts
game_object.is_talk_enabled

is_talking

ts
is_talking: Mock<() => boolean>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Whether object is currently talking with actor and talk dialog is active.

Implementation of

ts
game_object.is_talking

is_there_items_to_pickup

ts
is_there_items_to_pickup: Mock<() => boolean>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether nearby items are available for pickup.

Implementation of

ts
game_object.is_there_items_to_pickup

is_trade_enabled

ts
is_trade_enabled: MockedFunction<() => boolean>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Whether trade interaction is enabled.

Implementation of

ts
game_object.is_trade_enabled

is_trader

ts
is_trader: MockedFunction<() => boolean>;

Check whether this object is a trader.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a trader.

Implementation of

ts
game_object.is_trader

is_weapon

ts
is_weapon: MockedFunction<() => boolean>;

Check whether this object is a weapon.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a weapon.

Implementation of

ts
game_object.is_weapon

is_weapon_gl

ts
is_weapon_gl: MockedFunction<() => boolean>;

Check whether this object is a grenade-launcher weapon.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a weapon with grenade launcher support.

Implementation of

ts
game_object.is_weapon_gl

is_weapon_going_to_be_strapped

ts
is_weapon_going_to_be_strapped: Mock<() => boolean>;

Check whether a weapon is being strapped.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

weapon

Weapon to check.

Returns

Whether weapon is being strapped.

Implementation of

ts
game_object.is_weapon_going_to_be_strapped

is_weapon_magazined

ts
is_weapon_magazined: MockedFunction<() => boolean>;

Check whether this object is a magazined weapon.

Since

OpenXRay 2017-08-15, 565b39e5

Returns

Whether this object is a magazined weapon.

Implementation of

ts
game_object.is_weapon_magazined

isDeadBodyCanTake

ts
isDeadBodyCanTake: boolean = true;

isDeadBodyClosed

ts
isDeadBodyClosed: boolean = false;

isDoorLockedForNpc

ts
isDoorLockedForNpc: boolean = false;

isInventoryBoxCanTake

ts
isInventoryBoxCanTake: boolean = true;

isInventoryBoxClosed

ts
isInventoryBoxClosed: boolean = false;

isInvulnerable

ts
isInvulnerable: boolean = false;

isMarkedDropped

ts
isMarkedDropped: boolean = false;

isVisible

ts
isVisible: boolean = true;

isVisualMemoryEnabled

ts
isVisualMemoryEnabled: boolean = true;

item_in_slot

ts
item_in_slot: Mock<() => null>;

Get item in inventory slot.

Source

src/xrGame/script_game_object_inventory_owner.cpp, CScriptGameObject::item_in_slot.

Remarks

Requires this object to be a CInventoryOwner. Compatibility mode can shift slot ids by one for legacy minus-one slot ordering. Empty slots and non-inventory owners return null.

Param

slot

Inventory slot id.

Returns

Item in slot, or null.

Implementation of

ts
game_object.item_in_slot

item_on_belt

ts
item_on_belt: MockedFunction<(slot: number) => Nullable<game_object>>;

Get item on belt by belt container index.

Since

OpenXRay 2015-10-07, 658f68a2

Source

src/xrGame/script_game_object_inventory_owner.cpp, CScriptGameObject::ItemOnBelt.

Remarks

Requires this object to be a CInventoryOwner. Empty belt cells, non-inventory owners, and invalid belt indices return null after logging a script error where applicable.

Param

slot

Belt container index.

Returns

Item on belt, or null.

Implementation of

ts
game_object.item_on_belt

iterate_feel_touch

ts
iterate_feel_touch: MockedFunction<(callback: (this: void, object_id: number) => void) => void>;

Iterate object ids from this object's Feel::Touch contact list.

Since

OpenXRay 2016-05-31, 15edbfd9

Remarks

Requires this object to implement Feel::Touch. Objects without touch sensing do nothing. The callback receives each touched object's server id, not a game_object wrapper.

Param

callback

Callback invoked for each touched object id.

Implementation of

ts
game_object.iterate_feel_touch

iterate_installed_upgrades

ts
iterate_installed_upgrades: Mock<(cb: (upgrade: string, item: game_object) => boolean | void) => void>;

Iterate over all item upgrades.

Since

OpenXRay 2023-10-19, a6016f10, PR #1463

Param

callback

Callback to call on each iteration to check installed upgrades.

Implementation of

ts
game_object.iterate_installed_upgrades

iterate_inventory

ts
iterate_inventory: Mock<(cb: (owner: game_object, item: game_object) => boolean | void, owner: game_object) => void>;

Iterate over game object inventory. Runs supplied callback for each item in inventory of the object. If callback returns true, the cycle breaks.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

cb

Callback to run for each item.

Param

object

Target object to run callback for (actually unused by the engine).

Implementation of

ts
game_object.iterate_inventory

iterate_inventory_box

ts
iterate_inventory_box: MockedFunction<(cb: (this: void, box: game_object, item: game_object) => void, object: game_object) => void>;

Iterate items inside an inventory box.

Remarks

Requires this object to be an inventory box. Other object types log a script error and return a default value or do nothing.

Param

cb

Callback called for each box item.

Param

object

Inventory box object.

Implementation of

ts
game_object.iterate_inventory_box

jump

ts
jump: Mock<UnknownFunction>;

Force this monster to jump toward a point.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Param

target

Jump target.

Param

factor

Jump tuning factor used by the monster controller.

Implementation of

ts
game_object.jump

kill

ts
kill: Mock<UnknownFunction>;

Kill a target object.

Remarks

Requires this object to be an alive entity. The argument is recorded as the target affected by the kill call.

Param

object

Target object.

Implementation of

ts
game_object.kill

level_vertex_id

ts
level_vertex_id: Mock<() => number>;

Get current level vertex id.

Returns

Level vertex id.

Implementation of

ts
game_object.level_vertex_id

location_on_path

ts
location_on_path: Mock<(_distance: number, _position: vector) => number>;

Sample a future position on the current movement path.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

distance

Distance along the path.

Param

position

Output position.

Returns

Level vertex id for the sampled position.

Implementation of

ts
game_object.location_on_path

lock_door_for_npc

ts
lock_door_for_npc: MockedFunction<() => void>;

Lock this door for NPC navigation.

Remarks

Requires this object to be a door object managed by NPC door logic. Other object types do nothing or report an engine script error.

Implementation of

ts
game_object.lock_door_for_npc

lookout_max_time

ts
lookout_max_time: MockedFunction<{
  (): number;
  (value: number): void;
}>;

Get maximum lookout time.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Returns

Lookout time in milliseconds.

Implementation of

ts
game_object.lookout_max_time

lookout_min_time

ts
lookout_min_time: MockedFunction<{
  (): number;
  (time: number): void;
}>;

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Returns

Minimum time spent looking out from smart cover.

Implementation of

ts
game_object.lookout_min_time

make_item_active

ts
make_item_active: Mock<UnknownFunction>;

Make an inventory item active.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

item

Item to activate.

Implementation of

ts
game_object.make_item_active

make_object_visible_somewhen

ts
make_object_visible_somewhen: Mock<UnknownFunction>;

Make another object temporarily visible to this object's memory.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

object

Object to reveal.

Implementation of

ts
game_object.make_object_visible_somewhen

mark_item_dropped

ts
mark_item_dropped: MockedFunction<(object: game_object) => void>;

Mark an inventory item as dropped.

Param

object

Item object.

Implementation of

ts
game_object.mark_item_dropped

marked_dropped

ts
marked_dropped: MockedFunction<(object: game_object) => boolean>;

Check whether an item was marked as dropped by this object.

Param

object

Item object.

Returns

Whether the item is marked as dropped.

Implementation of

ts
game_object.marked_dropped

mass

ts
mass: MockedFunction<() => number>;

Returns

Physics mass of this object.

Implementation of

ts
game_object.mass

max_health

ts
max_health: MockedFunction<() => number>;

Returns

Maximum health for this entity.

Implementation of

ts
game_object.max_health

max_ignore_monster_distance

ts
max_ignore_monster_distance: MockedFunction<{
  (): number;
  (value: number): void;
}>;

Get maximum distance at which monsters can be ignored.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Distance.

Implementation of

ts
game_object.max_ignore_monster_distance

memory_hit_objects

ts
memory_hit_objects: MockedFunction<() => LuaIterable<hit_memory_object>>;

Iterate native hit-memory records for this monster.

Source

src/xrGame/script_game_object_script3.cpp, memory_hit_objects binding with return_stl_iterator().

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. The binding returns a Lua iterator over the native xr_vector<MemorySpace::CHitObject> collection.

Returns

Iterable hit-memory records.

Implementation of

ts
game_object.memory_hit_objects

memory_position

ts
memory_position: Mock<() => vector>;

Get remembered position of another object.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

object

Remembered object.

Returns

Last remembered position.

Implementation of

ts
game_object.memory_position

memory_sound_objects

ts
memory_sound_objects: MockedFunction<() => LuaIterable<sound_memory_object>>;

Iterate sound-memory records for this monster.

Source

src/xrGame/script_game_object_script3.cpp, memory_sound_objects binding with return_stl_iterator().

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. The binding returns a Lua iterator over the native xr_vector<MemorySpace::CSoundObject> collection.

Returns

Iterable sound-memory records.

Implementation of

ts
game_object.memory_sound_objects

memory_time

ts
memory_time: Mock<(_another: game_object) => number>;

Get time since this object remembered another object.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

another

Object to query.

Returns

Memory time.

Implementation of

ts
game_object.memory_time

memory_visible_objects

ts
memory_visible_objects: MockedFunction<() => LuaIterable<visible_memory_object>>;

Get visible objects from memory.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Iterable visible memory objects.

Implementation of

ts
game_object.memory_visible_objects

mental_state

ts
mental_state: MockedFunction<() => TXR_mental_state>;

Get current stalker mental state.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::mental_state.

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects log an engine script error and return anim.danger.

Returns

Current mental state.

Implementation of

ts
game_object.mental_state

money

ts
money: Mock<() => number>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Money owned by this inventory owner.

Implementation of

ts
game_object.money

motivation_action_manager

ts
motivation_action_manager: Mock<() => MockActionPlanner>;

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Returns

Motivation action planner for this object.

Implementation of

ts
game_object.motivation_action_manager

movement_enabled

ts
movement_enabled: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Whether movement is enabled for this inventory owner.

Implementation of

ts
game_object.movement_enabled

movement_target_reached

ts
movement_target_reached: MockedFunction<() => boolean>;

Check whether current movement target is reached.

Returns

Whether movement target is reached.

Implementation of

ts
game_object.movement_target_reached

movement_type

ts
movement_type: MockedFunction<() => TXR_movement_type>;

Get current stalker movement type.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::movement_type.

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects log an engine script error and return move.stand.

Returns

Current movement type.

Implementation of

ts
game_object.movement_type

name

ts
name: Mock<() => string>;

Get runtime object name.

Returns

Object name.

Implementation of

ts
game_object.name

night_vision_enabled

ts
night_vision_enabled: Mock<() => boolean>;

Remarks

Requires this object to be a torch item. Other object types log a script error and return a default value or do nothing.

Returns

Whether night vision is enabled on this torch item.

Implementation of

ts
game_object.night_vision_enabled

not_yet_visible_objects

ts
not_yet_visible_objects: MockedFunction<() => LuaIterable<not_yet_visible_object>>;

Iterate visual-memory candidates that are being detected but are not visible yet.

Source

src/xrGame/script_game_object_script3.cpp, not_yet_visible_objects binding with return_stl_iterator().

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. The binding returns a Lua iterator over the native visual memory manager collection. Use memory_visible_objects() for fully visible remembered objects.

Returns

Iterable pending-visibility records.

Implementation of

ts
game_object.not_yet_visible_objects

object

ts
object: Mock<(key: string | number) => game_object | null>;

Get inventory object by index or name.

Source

src/xrGame/script_game_object_script2.cpp, object bindings.

Remarks

Requires this object to be a CInventoryOwner. Numeric lookup uses the engine inventory index, not a runtime object id. String lookup searches inventory item names. Both overloads return null when the item is missing or the inventory entry cannot be cast back to a game object.

Param

value

Inventory index or item name.

Returns

Matching inventory item, or null.

Implementation of

ts
game_object.object

object_count

ts
object_count: Mock<() => number>;

Get inventory object count.

Returns

Inventory item count.

Implementation of

ts
game_object.object_count

objectActionManager

ts
objectActionManager: MockActionPlanner;

objectAlive

ts
objectAlive: boolean;

objectAmmoCount

ts
objectAmmoCount: number = 0;

objectAmmoElapsed

ts
objectAmmoElapsed: number = 0;

objectAmmoType

ts
objectAmmoType: number = 0;

objectBleeding

ts
objectBleeding: number;

objectCenter

ts
objectCenter: vector;

objectCharacterRank

ts
objectCharacterRank: number | null;

objectClsid

ts
objectClsid: TXR_class_id;

objectCommunity

ts
objectCommunity: string;

objectDirection

ts
objectDirection: vector;

objectGameVertexId

ts
objectGameVertexId: number;

objectHealth

ts
objectHealth: number;

objectId

ts
objectId: number;

objectInfoPortions

ts
objectInfoPortions: string[];

objectInRestrictions

ts
objectInRestrictions: string[];

objectInventory

ts
objectInventory: Map<string | number, game_object>;

objectLevelVertexId

ts
objectLevelVertexId: number;

objectMaxUses

ts
objectMaxUses: number = 1;

objectMoney

ts
objectMoney: number;

objectMorale

ts
objectMorale: number;

objectName

ts
objectName: string;

objectOutRestrictions

ts
objectOutRestrictions: string[];

objectPosition

ts
objectPosition: vector;

objectPower

ts
objectPower: number;

objectPsyHealth

ts
objectPsyHealth: number;

objectRadiation

ts
objectRadiation: number;

objectRank

ts
objectRank: number;

objectRemainingUses

ts
objectRemainingUses: number = 1;

objectRestrictorType

ts
objectRestrictorType: number = 0;

objectSatiety

ts
objectSatiety: number;

objectSection

ts
objectSection: string;

objectSpatialType

ts
objectSpatialType: number = 0;

objectSpawnIni

ts
objectSpawnIni: ini_file | null;

objectTaskStates

ts
objectTaskStates: Map<string, number>;

objectUpgradesSet

ts
objectUpgradesSet: Set<string>;

objectVisual

ts
objectVisual: string = "object_visual_name";

objectWeight

ts
objectWeight: number = 0;

on_door_is_closed

ts
on_door_is_closed: MockedFunction<() => void>;

Notify this door that it has closed.

Remarks

Requires this object to be a door object managed by NPC door logic. Other object types do nothing or report an engine script error.

Implementation of

ts
game_object.on_door_is_closed

on_door_is_open

ts
on_door_is_open: MockedFunction<() => void>;

Notify this door that it has opened.

Remarks

Requires this object to be a door object managed by NPC door logic. Other object types do nothing or report an engine script error.

Implementation of

ts
game_object.on_door_is_open

out_restrictions

ts
out_restrictions: Mock<() => string>;

Returns

Current outgoing restriction list.

Implementation of

ts
game_object.out_restrictions

parent

ts
parent: Mock<() => null>;

Get parent object.

Source

src/xrGame/script_game_object_use.cpp, CScriptGameObject::Parent.

Remarks

Returns null when the object has no parent game object.

Returns

Parent object, or null when no parent exists.

Implementation of

ts
game_object.parent

path_completed

ts
path_completed: MockedFunction<() => boolean>;

Check whether current path is complete.

Returns

Whether path was completed.

Implementation of

ts
game_object.path_completed

path_type

ts
path_type: MockedFunction<() => TXR_game_object_path>;

Get current movement path type.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::path_type.

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects log an engine script error and return game_object.no_path.

Returns

Current movement path type.

Implementation of

ts
game_object.path_type

patrol

ts
patrol: MockedFunction<() => Nullable<string>>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Current patrol path name, or null when no patrol path is active.

Implementation of

ts
game_object.patrol

patrol_path_make_inactual

ts
patrol_path_make_inactual: Mock<() => null>;

Mark the current patrol path as needing recalculation.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.patrol_path_make_inactual

phantom_set_enemy

ts
phantom_set_enemy: MockedFunction<(object: game_object) => void>;

Set enemy target for this phantom.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be a phantom. Other object types log a script error or do nothing.

Param

object

Enemy object.

Implementation of

ts
game_object.phantom_set_enemy

play_cycle

ts
play_cycle: Mock<UnknownFunction>;

Play a model animation cycle.

Param

animation

Animation name.

Param

mix_in

Whether to blend with current animation.

Implementation of

ts
game_object.play_cycle

play_hud_motion

ts
play_hud_motion: MockedFunction<(motion: string, mix_in: boolean, state: number) => number>;

Play a HUD animation if it exists.

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

motion

HUD motion name.

Param

mix_in

Whether to blend with the current animation.

Param

state

State to use for playback.

Returns

Playback motion id, or 0 when no matching motion exists.

Implementation of

ts
game_object.play_hud_motion

play_sound

ts
play_sound: Mock<UnknownFunction>;

Play an NPC sound by internal sound type.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

sound_type

Internal sound type.

Param

max_start_time

Optional maximum start delay.

Param

min_start_time

Optional minimum start delay.

Param

max_stop_time

Optional maximum stop time.

Param

min_stop_time

Optional minimum stop time.

Param

id

Optional sound id.

Implementation of

ts
game_object.play_sound

poltergeist_get_actor_ignore

ts
poltergeist_get_actor_ignore: Mock<() => boolean>;

Remarks

Requires this object to be a poltergeist. Other object types log a script error and return a default value or do nothing.

Returns

Whether this poltergeist ignores the actor.

Implementation of

ts
game_object.poltergeist_get_actor_ignore

poltergeist_set_actor_ignore

ts
poltergeist_set_actor_ignore: Mock<UnknownFunction>;

Set whether this poltergeist ignores the actor.

Remarks

Requires this object to be a poltergeist. Other object types log a script error and return a default value or do nothing.

Param

value

Whether actor should be ignored.

Implementation of

ts
game_object.poltergeist_set_actor_ignore

position

ts
position: Mock<() => vector>;

Get current world position.

Returns

Position vector.

Implementation of

ts
game_object.position

profile_name

ts
profile_name: MockedFunction<() => string>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Specific character profile name.

Implementation of

ts
game_object.profile_name

range

ts
range: MockedFunction<() => number>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Current vision or weapon range for this object.

Implementation of

ts
game_object.range

rank

ts
rank: Mock<() => number>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Character rank.

Implementation of

ts
game_object.rank

register_door_for_npc

ts
register_door_for_npc: MockedFunction<() => void>;

Register this door as usable by NPC navigation.

Remarks

Requires this object to be a door object managed by NPC door logic. Other object types do nothing or report an engine script error.

Implementation of

ts
game_object.register_door_for_npc

register_in_combat

ts
register_in_combat: MockedFunction<() => void>;

Register this stalker in its squad combat registry.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.register_in_combat

relation

ts
relation: MockedFunction<(object: game_object) => TXR_relation>;

Get relation to another object.

Param

object

Target object.

Returns

Relation id.

Implementation of

ts
game_object.relation

release_stand_sleep_animation

ts
release_stand_sleep_animation: Mock<UnknownFunction>;

Release forced standing sleep animation.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.release_stand_sleep_animation

remove_all_restrictions

ts
remove_all_restrictions: MockedFunction<() => void>;

Clear all space restrictions from this object.

Implementation of

ts
game_object.remove_all_restrictions

remove_danger

ts
remove_danger: MockedFunction<(object: danger_object) => void>;

Remove a danger event from this stalker's danger memory.

Since

OpenXRay 2022-12-02, 48a5ff60, PR #1015

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects return without changing memory. Pass a danger object previously obtained from best_danger() or another engine danger-memory lookup.

Param

object

Danger event to remove.

Implementation of

ts
game_object.remove_danger

remove_home

ts
remove_home: Mock<UnknownFunction>;

Clear the monster home restriction.

Remarks

Requires a custom monster with home movement state. It does not remove smart-terrain ownership.

Implementation of

ts
game_object.remove_home

remove_memory_hit_object

ts
remove_memory_hit_object: MockedFunction<(object: hit_memory_object) => void>;

Remove a hit-memory record from this stalker's memory manager.

Since

OpenXRay 2022-12-02, 48a5ff60, PR #1015

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects return without changing memory. Pass a record previously obtained from memory_hit_objects() or compatible engine memory lookup.

Param

object

Hit-memory record to remove.

Implementation of

ts
game_object.remove_memory_hit_object

remove_memory_sound_object

ts
remove_memory_sound_object: MockedFunction<(object: sound_memory_object) => void>;

Remove a sound-memory record from this stalker's memory manager.

Since

OpenXRay 2022-12-02, 48a5ff60, PR #1015

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects return without changing memory. Pass a record previously obtained from memory_sound_objects() or compatible engine memory lookup.

Param

object

Sound-memory record to remove.

Implementation of

ts
game_object.remove_memory_sound_object

remove_memory_visible_object

ts
remove_memory_visible_object: MockedFunction<(object: visible_memory_object) => void>;

Remove a visual-memory record from this stalker's memory manager.

Since

OpenXRay 2022-12-02, 48a5ff60, PR #1015

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects return without changing memory. Pass a record previously obtained from memory_visible_objects() or compatible engine memory lookup.

Param

object

Visual-memory record to remove.

Implementation of

ts
game_object.remove_memory_visible_object

remove_restrictions

ts
remove_restrictions: Mock<(outRemove: string, inRemove: string) => void>;

Remove movement restrictions from this object.

Remarks

Requires an object with AI path restriction support. Names must match restrictions previously added or configured for the object.

Param

out_restrictions

Out restriction names.

Param

in_restrictions

In restriction names.

Implementation of

ts
game_object.remove_restrictions

remove_sound

ts
remove_sound: MockedFunction<(sound_type: number) => void>;

Stop and remove an NPC sound by internal sound type.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

sound_type

Internal sound type.

Implementation of

ts
game_object.remove_sound

reset_action_queue

ts
reset_action_queue: MockedFunction<() => void>;

Clear queued entity actions.

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.reset_action_queue

reset_bone_protections

ts
reset_bone_protections: MockedFunction<(immunity_section: string, bones_section: string) => void>;

Reset stalker bone protections from immunity and bones sections.

Since

OpenXRay 2022-12-02, 5ba7bd86, PR #1016

Remarks

Requires this object to be a CAI_Stalker. Non-stalker objects log a script error and do nothing. The engine reads the provided config sections and updates the stalker's per-bone protections from the model user data.

Param

immunity_section

Immunity section name, or an empty string to use the model default.

Param

bones_section

Bones protection section name.

Implementation of

ts
game_object.reset_bone_protections

restore_default_start_dialog

ts
restore_default_start_dialog: MockedFunction<() => void>;

Restore the default start dialog for this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.restore_default_start_dialog

restore_ignore_monster_threshold

ts
restore_ignore_monster_threshold: Mock<UnknownFunction>;

Restore default monster ignore threshold.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.restore_ignore_monster_threshold

restore_max_ignore_monster_distance

ts
restore_max_ignore_monster_distance: Mock<UnknownFunction>;

Restore default monster-ignore distance.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.restore_max_ignore_monster_distance

restore_sound_threshold

ts
restore_sound_threshold: MockedFunction<() => void>;

Restore default sound threshold.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Implementation of

ts
game_object.restore_sound_threshold

restore_weapon

ts
restore_weapon: MockedFunction<() => void>;

Let the actor draw weapons again after a forced hide.

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Implementation of

ts
game_object.restore_weapon

run_talk_dialog

ts
run_talk_dialog: MockedFunction<(object: game_object, disable_break: boolean) => void>;

Start actor talk dialog with another inventory owner.

Since

OpenXRay 2023-04-17, 2b71746f

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Throws

The engine asserts if the dialog partner is not an inventory owner.

Param

object

Dialog partner.

Param

disable_break

Whether the dialog cannot be interrupted.

Implementation of

ts
game_object.run_talk_dialog

safe_cover

ts
safe_cover: MockedFunction<(position: vector, radius: number, min_distance: number) => cover_point>;

Find a safe cover near a position.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

position

Search position.

Param

radius

Search radius.

Param

min_distance

Minimum distance from position.

Returns

Cover point.

Implementation of

ts
game_object.safe_cover

script

ts
script: Mock<UnknownFunction>;

Enable or disable script control.

Remarks

Requires this object to be a scripted entity. Other object types log a script error and return a default value or do nothing.

Param

script_control

Whether script control is enabled.

Param

script_name

Script control name.

Implementation of

ts
game_object.script

section

ts
section: MockedFunction<<T>() => T>;

Returns

Config section name of this object.

Implementation of

ts
game_object.section

see

ts
see: Mock<() => boolean>;

Check whether this object can see another object.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

object

Object to test.

Returns

Whether the object is visible.

Implementation of

ts
game_object.see

sell_condition

ts
sell_condition: Mock<UnknownFunction>;

Load sell condition factors from an ini section.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

ini_file

Source ini file.

Param

section

Section name.

Implementation of

ts
game_object.sell_condition

set__force

ts
set__force: MockedFunction<(force: vector, magnitude: number, impulse: number) => void>;

Apply a physics force to this object.

Remarks

Requires this object to own a physics shell or physics holder. Other object types return null or do nothing.

Param

force

Force vector.

Param

magnitude

Force magnitude.

Param

impulse

Impulse factor.

Implementation of

ts
game_object.set__force

set_active_task

ts
set_active_task: Mock<UnknownFunction>;

Mark a task as active.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

task

Task to activate.

Implementation of

ts
game_object.set_active_task

set_actor_direction

ts
set_actor_direction: Mock<(it: number) => void>;

Set actor yaw direction.

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

direction

Direction angle.

Implementation of

ts
game_object.set_actor_direction

set_actor_jump_speed

ts
set_actor_jump_speed: MockedFunction<(speed: number) => void>;

Set actor jump speed.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

speed

Jump speed.

Implementation of

ts
game_object.set_actor_jump_speed

set_actor_max_walk_weight

ts
set_actor_max_walk_weight: MockedFunction<(weight: number) => void>;

Set actor maximum walk weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

weight

Maximum walk weight.

Implementation of

ts
game_object.set_actor_max_walk_weight

set_actor_max_weight

ts
set_actor_max_weight: MockedFunction<(weight: number) => void>;

Set actor maximum carry weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

weight

Maximum carry weight.

Implementation of

ts
game_object.set_actor_max_weight

set_actor_position

ts
set_actor_position: Mock<(it: vector) => void>;

Move the actor to a position.

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

position

New actor position.

Implementation of

ts
game_object.set_actor_position

set_actor_relation_flags

ts
set_actor_relation_flags: MockedFunction<(value: flags32) => void>;

Set actor relation flags for this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

value

Relation flags.

Implementation of

ts
game_object.set_actor_relation_flags

set_actor_run_coef

ts
set_actor_run_coef: MockedFunction<(coef: number) => void>;

Set actor run speed coefficient.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

coef

Run coefficient.

Implementation of

ts
game_object.set_actor_run_coef

set_actor_runback_coef

ts
set_actor_runback_coef: MockedFunction<(coef: number) => void>;

Set actor backward run speed coefficient.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

coef

Backward run coefficient.

Implementation of

ts
game_object.set_actor_runback_coef

set_actor_sprint_koef

ts
set_actor_sprint_koef: MockedFunction<(coef: number) => void>;

Set actor sprint speed coefficient.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

coef

Sprint coefficient.

Implementation of

ts
game_object.set_actor_sprint_koef

set_additional_max_walk_weight

ts
set_additional_max_walk_weight: MockedFunction<(weight: number) => void>;

Set additional maximum walk weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

weight

Additional walk weight.

Implementation of

ts
game_object.set_additional_max_walk_weight

set_additional_max_weight

ts
set_additional_max_weight: MockedFunction<(weight: number) => void>;

Set additional maximum carry weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Param

weight

Additional carry weight.

Implementation of

ts
game_object.set_additional_max_weight

set_alien_control

ts
set_alien_control: MockedFunction<(is_enabled: boolean) => void>;

Enable or disable bloodsucker alien control.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Param

is_enabled

Whether alien control is active.

Implementation of

ts
game_object.set_alien_control

set_ammo_elapsed

ts
set_ammo_elapsed: Mock<(value: number) => void>;

Set ammo count in current magazine.

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

count

Ammo count.

Implementation of

ts
game_object.set_ammo_elapsed

set_ammo_type

ts
set_ammo_type: MockedFunction<(type: number) => void>;

Set active ammo type for this weapon.

Since

OpenXRay 2016-02-25, 46c1c78c

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

type

Ammo type index.

Implementation of

ts
game_object.set_ammo_type

set_anomaly_power

ts
set_anomaly_power: MockedFunction<(power: number) => void>;

Set anomaly power.

Remarks

Requires this object to be a custom zone. Other object types log a script error and return a default value or do nothing.

Param

power

New anomaly power.

Implementation of

ts
game_object.set_anomaly_power

set_artefact_bleeding

ts
set_artefact_bleeding: MockedFunction<(rate: number) => void>;

Set artefact bleeding restore rate.

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Param

rate

Restore rate.

Implementation of

ts
game_object.set_artefact_bleeding

set_artefact_health

ts
set_artefact_health: MockedFunction<(rate: number) => void>;

Set artefact health restore rate.

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Param

rate

Restore rate.

Implementation of

ts
game_object.set_artefact_health

set_artefact_power

ts
set_artefact_power: MockedFunction<(rate: number) => void>;

Set artefact power restore rate.

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Param

rate

Restore rate.

Implementation of

ts
game_object.set_artefact_power

set_artefact_radiation

ts
set_artefact_radiation: MockedFunction<(rate: number) => void>;

Set artefact radiation restore rate.

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Param

rate

Restore rate.

Implementation of

ts
game_object.set_artefact_radiation

set_artefact_satiety

ts
set_artefact_satiety: MockedFunction<(rate: number) => void>;

Set artefact satiety restore rate.

Remarks

Requires this object to be an artefact. Other object types log a script error and return a default value or do nothing.

Param

rate

Restore rate.

Implementation of

ts
game_object.set_artefact_satiety

set_body_state

ts
set_body_state: Mock<UnknownFunction>;

Set target body state for stalker movement.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

state

Body state.

Implementation of

ts
game_object.set_body_state

set_bone_visible

ts
set_bone_visible: MockedFunction<(name: string, visible: boolean, recursive: boolean) => void>;

Set bone visibility on this object visual.

Since

OpenXRay 2015-07-07, 6e703b4c

Remarks

Requires this object to have a renderable visual. Objects without a visual can log an engine error or return a default value.

Param

name

Bone name.

Param

visible

Whether the bone is visible.

Param

recursive

Whether child bones are affected.

Implementation of

ts
game_object.set_bone_visible

set_callback

ts
set_callback: MockedFunction<{
  (type: TXR_callback, cb: Nillable<never>): void;
<T>  (type: 0, cb?: Nillable<(this: void) => void>, object?: Nillable<T>): void;
<T>  (type: 1, cb?: Nillable<(this: void) => void>, object?: Nillable<T>): void;
<T>  (type: 2, cb?: Nillable<(this: void, item: game_object, money_direction: boolean, money: number, partner: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 3, cb?: Nillable<(this: void, money_get: number, money_put: number) => void>, object?: Nillable<T>): void;
<T>  (type: 4, cb?: Nillable<(this: void, zone: game_object, object: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 5, cb?: Nillable<(this: void, zone: game_object, object: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 6, cb?: Nillable<(this: void, object: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 7, cb?: Nillable<(this: void, object: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 8, cb?: (this: void, target: game_object, killer: game_object) => void, object?: Nillable<T>): void;
<T>  (type: 9, cb?: Nillable<(this: void, object: game_object, action_type: number, point_index: number) => void>, object?: Nillable<T>): void;
<T>  (type: 11, cb?: Nillable<(this: void, npc: game_object, info_id: string) => void>, object?: Nillable<T>): void;
<T>  (type: 12, cb?: Nillable<(this: void, actor: game_object, group: string, name: string, article_type: number) => void>, object?: Nillable<T>): void;
<T>  (type: 13, cb?: Nillable<(this: void, task: CGameTask, state: TXR_TaskState) => void>, object?: Nillable<T>): void;
<T>  (type: 13, cb?: Nillable<(this: void, task: CGameTask, objective: SGameTaskObjective, state: TXR_TaskState) => void>, object?: Nillable<T>): void;
<T>  (type: 14, cb?: Nillable<(this: void, spot_type: string, id: number) => void>, object?: Nillable<T>): void;
<T>  (type: 15, cb?: Nillable<(this: void, object: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 15, cb?: Nillable<(this: void, object: game_object, who: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 16, cb?: Nillable<(this: void, object: game_object, damage: number, direction: vector, who: game_object, bone_id: number) => void>, object?: Nillable<T>): void;
<T>  (type: 17, cb?: Nillable<(this: void, object: game_object, source_id: number, sound_type: TXR_snd_type, position: vector, sound_power: number) => void>, object?: Nillable<T>): void;
<T>  (type: 18, cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type, target_point_index: -1) => void>, object?: Nillable<T>): void;
<T>  (type: 19, cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>, object?: Nillable<T>): void;
<T>  (type: 20, cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>, object?: Nillable<T>): void;
<T>  (type: 21, cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>, object?: Nillable<T>): void;
<T>  (type: 22, cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>, object?: Nillable<T>): void;
<T>  (type: 23, cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>, object?: Nillable<T>): void;
<T>  (type: 24, cb?: Nillable<(this: void, object: game_object, action_type: TXR_action_type) => void>, object?: Nillable<T>): void;
<T>  (type: 26, cb?: Nillable<(this: void, distance: number, current_position: vector, vertex_id: number) => void>, object?: Nillable<T>): void;
<T>  (type: 27, cb?: Nillable<(this: void, damage: number, impulse: number, hit_type: number, who_id: number) => void>, object?: Nillable<T>): void;
<T>  (type: 28, cb?: Nillable<(this: void, object: game_object, item: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 29, cb?: Nillable<(this: void, object: game_object, item: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 30, cb?: Nillable<(this: void, skip_multi_anim_check?: boolean) => void>, object?: Nillable<object>): void;
<T>  (type: 31, cb?: Nillable<(this: void) => void>, object?: Nillable<T>): void;
<T>  (type: 32, cb?: Nillable<(this: void) => void>, object?: Nillable<T>): void;
<T>  (type: 33, cb?: Nillable<(this: void) => void>, object?: Nillable<T>): void;
<T>  (type: 34, cb?: Nillable<(this: void, object: game_object, box: game_object, item: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 35, cb?: Nillable<(this: void, object: game_object, suitable_ammo_total: number) => void>, object?: Nillable<T>): void;
<T>  (type: 36, cb?: Nillable<(this: void, object: game_object, hud_section: string, current_motion: string, state: number, animation_slot: number) => void>, object?: Nillable<T>): void;
<T>  (type: 123, cb?: Nillable<(this: void, key: number) => void>, object?: Nillable<T>): void;
<T>  (type: 124, cb?: Nillable<(this: void, key: number) => void>, object?: Nillable<T>): void;
<T>  (type: 125, cb?: Nillable<(this: void, key: number) => void>, object?: Nillable<T>): void;
<T>  (type: 127, cb?: Nillable<(this: void, dx: number, dy: number) => void>, object?: Nillable<T>): void;
<T>  (type: 126, cb?: Nillable<(this: void, y: number, x: number) => void>, object?: Nillable<T>): void;
<T>  (type: 48, cb?: Nillable<(this: void, key: number, state: AnyObject) => void>, object?: Nillable<T>): void;
<T>  (type: 49, cb?: Nillable<(this: void, key: number, state: AnyObject) => void>, object?: Nillable<T>): void;
<T>  (type: 50, cb?: Nillable<(this: void, key: number, state: AnyObject) => void>, object?: Nillable<T>): void;
<T>  (type: 51, cb?: Nillable<(this: void, change: vector) => void>, object?: Nillable<T>): void;
<T>  (type: 37, cb?: Nillable<(this: void, object: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 38, cb?: Nillable<(this: void, object: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 39, cb?: Nillable<(this: void, object: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 40, cb?: Nillable<(this: void, owner: game_object, weapon: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 41, cb?: Nillable<(this: void, owner: game_object, weapon: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 42, cb?: Nillable<(this: void, owner: game_object, weapon: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 43, cb?: Nillable<(this: void, object: game_object, suitable_ammo_total: number) => void>, object?: Nillable<T>): void;
<T>  (type: 44, cb?: Nillable<(this: void, killer_id: number) => void>, object?: Nillable<T>): void;
<T>  (type: 45, cb?: Nillable<(this: void, vehicle: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 46, cb?: Nillable<(this: void, vehicle: game_object) => void>, object?: Nillable<T>): void;
<T>  (type: 47, cb?: Nillable<(this: void, vehicle: game_object) => void>, object?: Nillable<T>): void;
}>;

Clear one callback registration.

Remarks

Uses the no-functor CScriptGameObject::SetCallback(type) overload, which clears the callback slot.

Param

type

Callback type to clear.

Param

cb

Nullish value used to select the clear overload.

Implementation of

ts
game_object.set_callback

set_capture_anim

ts
set_capture_anim: MockedFunction<(object: game_object, animation: string, position: vector, factor: number) => void>;

Configure bloodsucker capture animation jump.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Param

object

Target object.

Param

animation

Capture animation name.

Param

position

Jump position.

Param

factor

Jump force factor.

Implementation of

ts
game_object.set_capture_anim

set_character_community

ts
set_character_community: MockedFunction<(community: string, rank: number, goodwill: number) => void>;

Set character community.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

community

Community id.

Param

rank

Rank value used by relation logic.

Param

goodwill

Goodwill value.

Implementation of

ts
game_object.set_character_community

set_character_icon

ts
set_character_icon: MockedFunction<(icon: string) => void>;

Set character icon texture id.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

icon

Icon id.

Implementation of

ts
game_object.set_character_icon

set_character_rank

ts
set_character_rank: MockedFunction<(rank: number) => void>;

Set character rank.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

rank

Rank value.

Implementation of

ts
game_object.set_character_rank

set_character_reputation

ts
set_character_reputation: MockedFunction<(reputation: number) => void>;

Set character reputation.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

reputation

Reputation value.

Implementation of

ts
game_object.set_character_reputation

set_collision_off

ts
set_collision_off: MockedFunction<(value: boolean) => void>;

Enable or disable bloodsucker collision override.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Param

value

Whether collision is disabled.

Implementation of

ts
game_object.set_collision_off

set_community_goodwill

ts
set_community_goodwill: Mock<UnknownFunction>;

Set goodwill toward a community.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

community

Community id.

Param

goodwill

Goodwill value.

Implementation of

ts
game_object.set_community_goodwill

set_condition

ts
set_condition: Mock<UnknownFunction>;

Set item condition.

Param

condition

New condition value.

Implementation of

ts
game_object.set_condition

set_const_force

ts
set_const_force: Mock<UnknownFunction>;

Apply constant force for a time interval.

Remarks

Requires this object to own a physics shell or physics holder. Other object types return null or do nothing.

Param

direction

Force direction.

Param

power

Force power.

Param

time_interval

Duration in milliseconds.

Implementation of

ts
game_object.set_const_force

set_custom_panic_threshold

ts
set_custom_panic_threshold: MockedFunction<(threshold: number) => void>;

Set custom panic threshold for this base monster.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

threshold

Panic threshold.

Implementation of

ts
game_object.set_custom_panic_threshold

set_default_panic_threshold

ts
set_default_panic_threshold: MockedFunction<() => void>;

Restore the default panic threshold.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_default_panic_threshold

set_desired_direction

ts
set_desired_direction: Mock<UnknownFunction>;

Clear desired movement direction for this stalker.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_desired_direction

set_desired_position

ts
set_desired_position: Mock<UnknownFunction>;

Clear desired movement position for this stalker.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_desired_position

set_dest_game_vertex_id

ts
set_dest_game_vertex_id: Mock<UnknownFunction>;

Set destination game graph vertex.

Remarks

Requires an AI object with movement path state. The vertex id must be valid in the game graph.

Param

value

Game vertex id.

Implementation of

ts
game_object.set_dest_game_vertex_id

set_dest_level_vertex_id

ts
set_dest_level_vertex_id: Mock<UnknownFunction>;

Set destination level vertex.

Remarks

Requires an AI object with movement path state. The vertex id must be valid in the current level graph.

Param

vertex_id

Target level vertex id.

Implementation of

ts
game_object.set_dest_level_vertex_id

set_dest_loophole

ts
set_dest_loophole: Mock<UnknownFunction>;

Clear desired smart-cover loophole.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_dest_loophole

set_dest_smart_cover

ts
set_dest_smart_cover: Mock<UnknownFunction>;

Clear destination smart cover.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_dest_smart_cover

set_detail_path_type

ts
set_detail_path_type: Mock<UnknownFunction>;

Set detail path type used by movement.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

type

Detail path type id.

Implementation of

ts
game_object.set_detail_path_type

set_enemy

ts
set_enemy: MockedFunction<(object: game_object) => void>;

Set current enemy object.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

object

Enemy object.

Implementation of

ts
game_object.set_enemy

set_enemy_callback

ts
set_enemy_callback: MockedFunction<{
  (cb: null): void;
<T>  (cb: (this: T, object: game_object, enemy: game_object) => boolean, object: T): void;
}>;

Clear the custom enemy selector callback.

Implementation of

ts
game_object.set_enemy_callback

set_fastcall

ts
set_fastcall: Mock<UnknownFunction>;

Set a fast update callback for this object.

Param

cb

Callback called from the object's fast update path.

Param

context

Lua context used as callback this.

Implementation of

ts
game_object.set_fastcall

set_force_anti_aim

ts
set_force_anti_aim: Mock<UnknownFunction>;

Force or release anti-aim behavior for this base monster.

Remarks

Requires this object to be a base monster. Other object types log a script error and return a default value or do nothing.

Param

value

Whether anti-aim is forced.

Implementation of

ts
game_object.set_force_anti_aim

set_fov

ts
set_fov: MockedFunction<(fov: number) => void>;

Set field of view.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

fov

Field of view angle.

Implementation of

ts
game_object.set_fov

set_goodwill

ts
set_goodwill: MockedFunction<(goodwill: number, object: game_object) => void>;

Set goodwill toward another object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

goodwill

Goodwill value.

Param

object

Target object.

Implementation of

ts
game_object.set_goodwill

set_health_ex

ts
set_health_ex: Mock<(value: number) => void>;

Directly set entity health instead of applying a health property delta.

Since

OpenXRay 2015-02-01, a91ff26a

Remarks

This binding exists because the normal health property setter routes through conditions().ChangeHealth.

Implementation of

ts
game_object.set_health_ex

set_home

ts
set_home: Mock<UnknownFunction>;

Set monster home by patrol path name.

Param

name

Patrol path name, or null to clear home.

Param

min_radius

Minimum home radius.

Param

max_radius

Maximum home radius.

Param

is_aggressive

Whether home is aggressive.

Param

mid_radius

Middle home radius.

Implementation of

ts
game_object.set_home

set_invisible

ts
set_invisible: Mock<UnknownFunction>;

Force bloodsucker invisibility state.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Param

is_invisible

Whether the object should be invisible.

Implementation of

ts
game_object.set_invisible

set_item

ts
set_item: Mock<UnknownFunction>;

Set item used by an action.

Param

action_id

Action id.

Param

object

Item object, or null.

Param

min_queue_size

Optional minimum queue size.

Param

max_queue_size

Optional maximum queue size.

Implementation of

ts
game_object.set_item

set_level_changer_invitation

ts
set_level_changer_invitation: Mock<UnknownFunction>;

Set level changer invitation hint text.

Remarks

Requires this object to be a level changer. Other object types do nothing.

Param

hint

Text to show when trying to change level.

Implementation of

ts
game_object.set_level_changer_invitation

set_main_weapon_type

ts
set_main_weapon_type: MockedFunction<(type: number) => void>;

Set main weapon type id.

Since

OpenXRay 2016-02-25, 46c1c78c

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

type

Main weapon type id.

Implementation of

ts
game_object.set_main_weapon_type

set_manual_invisibility

ts
set_manual_invisibility: Mock<UnknownFunction>;

Enable or disable manual bloodsucker invisibility control.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Param

value

Whether manual invisibility control is enabled.

Implementation of

ts
game_object.set_manual_invisibility

set_mental_state

ts
set_mental_state: Mock<UnknownFunction>;

Set mental animation state.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

state

Target mental state.

Implementation of

ts
game_object.set_mental_state

set_movement_selection_type

ts
set_movement_selection_type: Mock<UnknownFunction>;

Set movement target selection type.

Source

src/xrGame/script_game_object3.cpp, CScriptGameObject::set_movement_selection_type.

Remarks

Requires this object to be a CAI_Stalker. The native wrapper logs an error for non-stalker objects but then still dereferences the missing stalker pointer, so this should only be called after the runtime type is known.

Param

type

Selection type id.

Implementation of

ts
game_object.set_movement_selection_type

set_movement_type

ts
set_movement_type: Mock<UnknownFunction>;

Set target movement type for this stalker.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

movement_type

Movement type.

Implementation of

ts
game_object.set_movement_type

set_nonscript_usable

ts
set_nonscript_usable: Mock<UnknownFunction>;

Set whether this usable object may be used by non-script logic.

Param

is_usable

Whether non-script usage is allowed.

Implementation of

ts
game_object.set_nonscript_usable

set_npc_position

ts
set_npc_position: Mock<UnknownFunction>;

Move an NPC to a position.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

position

New NPC position.

Implementation of

ts
game_object.set_npc_position

set_override_animation

ts
set_override_animation: MockedFunction<(animation: string) => void>;

Force an override animation.

Param

animation

Animation name.

Implementation of

ts
game_object.set_override_animation

set_path_type

ts
set_path_type: Mock<UnknownFunction>;

Set path planning type.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

type

Path type.

Implementation of

ts
game_object.set_path_type

set_patrol_extrapolate_callback

ts
set_patrol_extrapolate_callback: Mock<UnknownFunction>;

Set or clear the patrol extrapolation callback.

Param

cb

Callback called with current patrol point index.

Param

object

Optional Lua context.

Implementation of

ts
game_object.set_patrol_extrapolate_callback

set_patrol_path

ts
set_patrol_path: Mock<UnknownFunction>;

Set movement patrol path.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

path_name

Patrol path name.

Param

start_type

Patrol start type.

Param

route_type

Patrol route type.

Param

random

Whether path point selection is random.

Implementation of

ts
game_object.set_patrol_path

set_previous_point

ts
set_previous_point: MockedFunction<(point: number) => void>;

Set previous patrol point index.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

point

Point index.

Implementation of

ts
game_object.set_previous_point

set_queue_size

ts
set_queue_size: MockedFunction<(size: number) => void>;

Set weapon fire queue size.

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

size

Queue size.

Implementation of

ts
game_object.set_queue_size

set_range

ts
set_range: MockedFunction<(range: number) => void>;

Set monster vision range.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

range

New range.

Implementation of

ts
game_object.set_range

set_relation

ts
set_relation: Mock<UnknownFunction>;

Set relation to another object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

relation

Relation id.

Param

object

Target object.

Implementation of

ts
game_object.set_relation

set_remaining_uses

ts
set_remaining_uses: MockedFunction<(remaining: number) => void>;

Set remaining item uses count.

Since

OpenXRay 2015-08-27, 7840b0fe

Remarks

Requires this object to be an eatable inventory item. Other object types log a script error and return a default value or do nothing.

Param

remaining

Count of remaining uses for item before destroy.

Implementation of

ts
game_object.set_remaining_uses

set_restrictor_type

ts
set_restrictor_type: MockedFunction<(type: TXR_restrictor_type) => void>;

Set space-restrictor category.

Remarks

Requires this object to be a space restrictor. Other object types silently do nothing.

Param

type

Restrictor type.

Implementation of

ts
game_object.set_restrictor_type

set_sight

ts
set_sight: MockedFunction<{
  (type: TXR_SightType, torso_look: boolean, path: boolean): void;
  (type: TXR_SightType, target: Nillable<vector>, look_over_delay: number): void;
  (type: TXR_SightType, target: vector, torso_look: boolean, fire_object: boolean): void;
  (type: TXR_SightType, target: vector, torso_look: boolean): void;
  (type: TXR_SightType, target: vector): void;
  (object: game_object, torso_look?: boolean, fire_object?: boolean, no_pitch?: boolean): void;
}>;

Set the NPC sight mode from a sight type and movement-facing options.

Param

type

Sight mode.

Param

torso_look

Whether the torso should turn toward the sight target.

Param

path

Whether to use the current path direction.

Implementation of

ts
game_object.set_sight

set_smart_cover_target

ts
set_smart_cover_target: Mock<UnknownFunction>;

Clear smart cover target.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_smart_cover_target

set_smart_cover_target_default

ts
set_smart_cover_target_default: Mock<UnknownFunction>;

Enable or disable default smart cover target.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Param

is_enabled

Whether default target is enabled.

Implementation of

ts
game_object.set_smart_cover_target_default

set_smart_cover_target_fire

ts
set_smart_cover_target_fire: Mock<UnknownFunction>;

Use smart cover fire target.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_smart_cover_target_fire

set_smart_cover_target_fire_no_lookout

ts
set_smart_cover_target_fire_no_lookout: Mock<UnknownFunction>;

Make the smart-cover target mode fire without lookout.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_smart_cover_target_fire_no_lookout

set_smart_cover_target_idle

ts
set_smart_cover_target_idle: Mock<UnknownFunction>;

Make smart-cover target selection prefer idle positions.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_smart_cover_target_idle

set_smart_cover_target_lookout

ts
set_smart_cover_target_lookout: Mock<UnknownFunction>;

Use smart cover lookout target.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.set_smart_cover_target_lookout

set_smart_cover_target_selector

ts
set_smart_cover_target_selector: Mock<UnknownFunction>;

Set or clear smart-cover target selection callback.

Param

cb

Callback that receives this object when a smart-cover target is selected.

Param

object

Optional Lua context.

Implementation of

ts
game_object.set_smart_cover_target_selector

set_sound_mask

ts
set_sound_mask: Mock<UnknownFunction>;

Set active sound mask for this monster.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

mask

Sound mask.

Implementation of

ts
game_object.set_sound_mask

set_sound_threshold

ts
set_sound_threshold: MockedFunction<(threshold: number) => void>;

Set sound memory threshold for this monster.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

threshold

Sound threshold.

Implementation of

ts
game_object.set_sound_threshold

set_spatial_type

ts
set_spatial_type: MockedFunction<(type: number) => void>;

Set spatial registration type for this object.

Since

OpenXRay 2016-05-31, 15edbfd9

Remarks

Requires this object to be registered in spatial object logic. Other object types can log an engine error or return a default value.

Param

type

Spatial type mask.

Implementation of

ts
game_object.set_spatial_type

set_start_dialog

ts
set_start_dialog: Mock<UnknownFunction>;

Set start dialog id for this phrase dialog manager.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

dialog_id

Dialog id.

Implementation of

ts
game_object.set_start_dialog

set_start_point

ts
set_start_point: MockedFunction<(point: number) => void>;

Set start patrol point index.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Param

point

Point index.

Implementation of

ts
game_object.set_start_point

set_sympathy

ts
set_sympathy: Mock<UnknownFunction>;

Set sympathy value used by relation logic.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

value

Sympathy value.

Implementation of

ts
game_object.set_sympathy

set_task_state

ts
set_task_state: MockedFunction<(state: TXR_TaskState, task_id: string) => void>;

Set the state of a task by id.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

state

New task state.

Param

task_id

Task id.

Implementation of

ts
game_object.set_task_state

set_tip_text

ts
set_tip_text: Mock<UnknownFunction>;

Set tip text when actor is near and hovering aim over target. As example, talk, loot and other kind of labels is possible when using this method.

Param

text

Text to set as tip.

Implementation of

ts
game_object.set_tip_text

set_tip_text_default

ts
set_tip_text_default: MockedFunction<() => void>;

Restore default usable-object tip text.

Implementation of

ts
game_object.set_tip_text_default

set_trader_global_anim

ts
set_trader_global_anim: MockedFunction<(animation: string) => void>;

Set trader global animation.

Remarks

Requires this object to be a trader-capable inventory owner. Other object types log a script error and return a default value or do nothing.

Param

animation

Animation name.

Implementation of

ts
game_object.set_trader_global_anim

set_trader_head_anim

ts
set_trader_head_anim: MockedFunction<(animation: string) => void>;

Set trader head animation.

Remarks

Requires this object to be a trader-capable inventory owner. Other object types log a script error and return a default value or do nothing.

Param

animation

Animation name.

Implementation of

ts
game_object.set_trader_head_anim

set_trader_sound

ts
set_trader_sound: MockedFunction<(animation: string, sound: string) => void>;

Set trader sound for an animation state.

Remarks

Requires this object to be a trader-capable inventory owner. Other object types log a script error and return a default value or do nothing.

Param

animation

Trader animation name.

Param

sound

Sound name.

Implementation of

ts
game_object.set_trader_sound

set_vis_state

ts
set_vis_state: MockedFunction<(state: number) => void>;

Set bloodsucker visibility state as a raw engine value.

Remarks

Requires this object to be a bloodsucker. Other object types log a script error and return a default value or do nothing.

Param

state

Visibility state.

Implementation of

ts
game_object.set_vis_state

set_visual_memory_enabled

ts
set_visual_memory_enabled: MockedFunction<(enabled: boolean) => void>;

Enable or disable visual memory for this object.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

enabled

Whether visual memory is enabled.

Implementation of

ts
game_object.set_visual_memory_enabled

set_visual_name

ts
set_visual_name: Mock<(name: string) => void>;

Set visual name for this object.

Remarks

Requires this object to have a renderable visual. Objects without a visual can log an engine error or return a default value.

Param

name

Visual name.

Implementation of

ts
game_object.set_visual_name

set_weapon_type

ts
set_weapon_type: MockedFunction<(type: number) => void>;

Set weapon type id.

Since

OpenXRay 2016-02-25, 46c1c78c

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

type

Weapon type id.

Implementation of

ts
game_object.set_weapon_type

set_weight

ts
set_weight: Mock<(value: number) => void>;

Set carried object weight.

Since

OpenXRay 2016-04-12, 1a206d71

Param

weight

New weight.

Implementation of

ts
game_object.set_weight

show_condition

ts
show_condition: MockedFunction<(ini_file: ini_file, section: string) => void>;

Set trade show condition.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

ini_file

Trade config.

Param

section

Condition section.

Implementation of

ts
game_object.show_condition

sight

ts
sight: TXR_SightType = MockSightParameters.eSightTypeDummy;

sight_params

ts
sight_params: Mock<() => MockSightParameters>;

Remarks

Requires a stalker or another AI object with a sight manager.

Returns

Current sight parameters.

Implementation of

ts
game_object.sight_params

skip_transfer_enemy

ts
skip_transfer_enemy: MockedFunction<(value: boolean) => void>;

Enable or disable enemy transfer skipping.

Remarks

Requires a custom monster. It controls whether the monster shares enemy information through monster feel logic.

Param

value

Whether enemy transfer should be skipped.

Implementation of

ts
game_object.skip_transfer_enemy

sniper_fire_mode

ts
sniper_fire_mode: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether stalker sniper fire mode is enabled.

Implementation of

ts
game_object.sniper_fire_mode

sniper_update_rate

ts
sniper_update_rate: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether sniper update rate is enabled.

Implementation of

ts
game_object.sniper_update_rate

sound_prefix

ts
sound_prefix: MockedFunction<{
  (): string;
  (prefix: string): void;
}>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Current sound voice prefix used by the object sound player.

Implementation of

ts
game_object.sound_prefix

sound_voice_prefix

ts
sound_voice_prefix: MockedFunction<() => string>;

Get voice sound prefix.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Voice sound prefix.

Implementation of

ts
game_object.sound_voice_prefix

spawn_ini

ts
spawn_ini: Mock<() => ini_file | null>;

Returns

Spawn ini attached to this object, or null.

Implementation of

ts
game_object.spawn_ini

special_danger_move

ts
special_danger_move: Mock<() => boolean>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether special danger movement is enabled.

Implementation of

ts
game_object.special_danger_move

squad

ts
squad: Mock<() => number>;

Returns

Game object squad id.

Implementation of

ts
game_object.squad

start_particles

ts
start_particles: Mock<UnknownFunction>;

Start particles attached to a bone.

Remarks

Requires the bone to exist on this object's visual. Use stop_particles() with the same effect and bone when the script owns the effect lifetime.

Param

name

Particle effect name.

Param

bone

Bone name.

Implementation of

ts
game_object.start_particles

start_trade

ts
start_trade: MockedFunction<(object: game_object) => void>;

Start trade with another object.

Since

OpenXRay 2016-04-12, 1a206d71

Remarks

Requires this object to be the actor and the argument to be an inventory owner. Invalid object types do nothing or log an engine script error.

Param

object

Trade partner.

Implementation of

ts
game_object.start_trade

start_upgrade

ts
start_upgrade: MockedFunction<(object: game_object) => void>;

Start upgrade interaction with another object.

Since

OpenXRay 2016-04-12, 1a206d71

Remarks

Requires this object to be the actor and the argument to be an inventory owner. Invalid object types do nothing or log an engine script error.

Param

object

Upgrade partner.

Implementation of

ts
game_object.start_upgrade

stop_particles

ts
stop_particles: Mock<UnknownFunction>;

Stop particles attached to a bone.

Remarks

Requires the effect to have been started on this object and the bone to exist on its visual.

Param

name

Particle effect name.

Param

bone

Bone name.

Implementation of

ts
game_object.stop_particles

stop_talk

ts
stop_talk: Mock<UnknownFunction>;

Stop the current actor talk dialog.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.stop_talk

story_id

ts
story_id: MockedFunction<() => number>;

Get story id assigned to this object.

Returns

Story id, or engine default when no story id is assigned.

Implementation of

ts
game_object.story_id

suitable_smart_cover

ts
suitable_smart_cover: MockedFunction<(object: game_object) => boolean>;

Check whether a smart-cover object is suitable for this stalker.

Remarks

Requires this object to be a stalker using smart-cover movement. Other object types log a script error and return a default value or do nothing.

Param

object

Smart-cover object.

Returns

Whether the cover is suitable.

Implementation of

ts
game_object.suitable_smart_cover

switch_state

ts
switch_state: MockedFunction<(state: number) => void>;

Switch HUD item state.

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

state

New HUD item state.

Implementation of

ts
game_object.switch_state

switch_to_talk

ts
switch_to_talk: MockedFunction<() => void>;

Open talk dialog with this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.switch_to_talk

switch_to_trade

ts
switch_to_trade: MockedFunction<() => void>;

Open trade dialog with this object.

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Implementation of

ts
game_object.switch_to_trade

switch_to_upgrade

ts
switch_to_upgrade: MockedFunction<() => void>;

Switch the opened talk menu to upgrade mode.

Remarks

Requires this object to be the actor. Other object types log a script error or do nothing.

Implementation of

ts
game_object.switch_to_upgrade

sympathy

ts
sympathy: MockedFunction<() => number>;

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Sympathy value used by relation logic.

Implementation of

ts
game_object.sympathy

take_items_enabled

ts
take_items_enabled: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether this NPC may take items.

Implementation of

ts
game_object.take_items_enabled

target_body_state

ts
target_body_state: Mock<() => 1>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Target body state requested by the movement manager.

Implementation of

ts
game_object.target_body_state

target_mental_state

ts
target_mental_state: Mock<() => 1>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Target mental state requested by the movement manager.

Implementation of

ts
game_object.target_mental_state

target_movement_type

ts
target_movement_type: Mock<() => 1>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Target movement type requested by the movement manager.

Implementation of

ts
game_object.target_movement_type

team

ts
team: Mock<() => number>;

Returns

Object team id.

Implementation of

ts
game_object.team

torch_enabled

ts
torch_enabled: Mock<() => boolean>;

Remarks

Requires this object to be a torch item. Other object types log a script error and return a default value or do nothing.

Returns

Whether actor torch is enabled.

Implementation of

ts
game_object.torch_enabled

transfer_item

ts
transfer_item: Mock<(item: game_object, to: game_object) => void>;

Transfer an item to another inventory owner.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

item

Item to transfer.

Param

to

Recipient object.

Implementation of

ts
game_object.transfer_item

transfer_money

ts
transfer_money: Mock<UnknownFunction>;

Transfer money from another object to this object.

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Param

amount

Money amount.

Param

from

Source object.

Implementation of

ts
game_object.transfer_money

unload_magazine

ts
unload_magazine: MockedFunction<() => void>;

Unload the active weapon magazine into inventory.

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.unload_magazine

unlock_door_for_npc

ts
unlock_door_for_npc: MockedFunction<() => void>;

Unlock this door for NPC navigation.

Remarks

Requires this object to be a door object managed by NPC door logic. Other object types do nothing or report an engine script error.

Implementation of

ts
game_object.unlock_door_for_npc

unregister_door_for_npc

ts
unregister_door_for_npc: MockedFunction<() => void>;

Unregister this door from NPC door management.

Remarks

Requires this object to be a door object managed by NPC door logic. Other object types do nothing or report an engine script error.

Implementation of

ts
game_object.unregister_door_for_npc

unregister_in_combat

ts
unregister_in_combat: MockedFunction<() => void>;

Remove this stalker from its squad combat registry.

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Implementation of

ts
game_object.unregister_in_combat

use

ts
use: MockedFunction<(object: game_object) => void>;

Use an object.

Since

OpenXRay 2016-04-12, 1a206d71

Remarks

Requires this object to support the requested use interaction. Unsupported object pairs do nothing or report an engine script error.

Param

object

Object to use.

Implementation of

ts
game_object.use

use_smart_covers_only

ts
use_smart_covers_only: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether smart-cover selection is restricted to smart covers only.

Implementation of

ts
game_object.use_smart_covers_only

vertex_in_direction

ts
vertex_in_direction: MockedFunction<(level_vertex_id: number, direction: vector, max_distance: number) => number>;

Find the farthest accessible level vertex in a direction.

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Param

level_vertex_id

Starting level vertex id.

Param

direction

Direction to search in.

Param

max_distance

Maximum search distance.

Returns

Found level vertex id, or the start vertex if none is valid.

Implementation of

ts
game_object.vertex_in_direction

visibility_threshold

ts
visibility_threshold: MockedFunction<() => number>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Visibility threshold used by this object.

Implementation of

ts
game_object.visibility_threshold

vision_enabled

ts
vision_enabled: MockedFunction<() => boolean>;

Remarks

Requires this object to be a CCustomMonster or one of its subclasses. Items, actors, and other objects log a script error and return a default value or do nothing.

Returns

Whether visual memory is enabled for this monster.

Implementation of

ts
game_object.vision_enabled

weapon_addon_attach

ts
weapon_addon_attach: MockedFunction<(object: game_object) => void>;

Attach a weapon addon from an inventory object.

Since

OpenXRay 2015-01-06, 8f694c78

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

object

Addon object.

Implementation of

ts
game_object.weapon_addon_attach

weapon_addon_detach

ts
weapon_addon_detach: MockedFunction<(addon: string) => void>;

Detach a weapon addon by section name.

Since

OpenXRay 2015-01-06, 8f694c78

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Param

addon

Addon section name.

Implementation of

ts
game_object.weapon_addon_detach

weapon_grenadelauncher_status

ts
weapon_grenadelauncher_status: MockedFunction<() => number>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Grenade launcher attachment status for the active weapon.

Implementation of

ts
game_object.weapon_grenadelauncher_status

weapon_in_grenade_mode

ts
weapon_in_grenade_mode: MockedFunction<() => boolean>;

Check whether weapon is in grenade launcher fire mode.

Since

OpenXRay 2016-09-14, 4f312ea6

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Whether this weapon is in grenade launcher fire mode.

Implementation of

ts
game_object.weapon_in_grenade_mode

weapon_is_grenadelauncher

ts
weapon_is_grenadelauncher: MockedFunction<() => boolean>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Whether the active weapon has an attached grenade launcher.

Implementation of

ts
game_object.weapon_is_grenadelauncher

weapon_is_scope

ts
weapon_is_scope: MockedFunction<() => boolean>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Whether the active weapon has a scope attached.

Implementation of

ts
game_object.weapon_is_scope

weapon_is_silencer

ts
weapon_is_silencer: MockedFunction<() => boolean>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Whether the active weapon has an attached silencer.

Implementation of

ts
game_object.weapon_is_silencer

weapon_scope_status

ts
weapon_scope_status: MockedFunction<() => number>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Scope attachment status for the active weapon.

Implementation of

ts
game_object.weapon_scope_status

weapon_silencer_status

ts
weapon_silencer_status: MockedFunction<() => number>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Active weapon silencer status.

Implementation of

ts
game_object.weapon_silencer_status

weapon_strapped

ts
weapon_strapped: Mock<() => boolean>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Whether the active weapon is strapped.

Implementation of

ts
game_object.weapon_strapped

weapon_unstrapped

ts
weapon_unstrapped: Mock<() => boolean>;

Remarks

Requires this object to be a weapon. Other object types log a script error and return a default value or do nothing.

Returns

Whether the active weapon is unstrapped.

Implementation of

ts
game_object.weapon_unstrapped

weight

ts
weight: Mock<() => number>;

Get object weight.

Since

OpenXRay 2015-10-07, 658f68a2

Remarks

Requires this object to be a CInventoryOwner. Other object types log a script error and return a default value or do nothing.

Returns

Inventory weight for this object.

Implementation of

ts
game_object.weight

who_hit_name

ts
who_hit_name: MockedFunction<() => string>;

Returns

Name of the object that last hit this object.

Implementation of

ts
game_object.who_hit_name

who_hit_section_name

ts
who_hit_section_name: MockedFunction<() => string>;

Returns

Section name of the object that last hit this object.

Implementation of

ts
game_object.who_hit_section_name

wounded

ts
wounded: MockedFunction<{
  (): boolean;
  (value: boolean): void;
}>;

Remarks

Requires this object to be a CAI_Stalker. Other object types log a script error and return a default value or do nothing.

Returns

Whether this stalker is marked as wounded.

Implementation of

ts
game_object.wounded

action_type_count

ts
readonly static action_type_count: number = 6;

Engine enum value for game_object.action_type_count.


alifeMovementTypeMask

ts
readonly static alifeMovementTypeMask: number = 0;

Engine enum value for game_object.alifeMovementTypeMask.


alifeMovementTypeRandom

ts
readonly static alifeMovementTypeRandom: number = 1;

Engine enum value for game_object.alifeMovementTypeRandom.


animation

ts
readonly static animation: number = 2;

Engine enum value for game_object.animation.


dialog_pda_msg

ts
readonly static dialog_pda_msg: number = 0;

Engine enum value for game_object.dialog_pda_msg.


dummy

ts
readonly static dummy: number = -1;

Engine enum value for game_object.dummy.


enemy

ts
readonly static enemy: number = 2;

Engine enum value for game_object.enemy.


friend

ts
readonly static friend: number = 0;

Engine enum value for game_object.friend.


game_path

ts
readonly static game_path: number = 0;

Engine enum value for game_object.game_path.


info_pda_msg

ts
readonly static info_pda_msg: number = 1;

Engine enum value for game_object.info_pda_msg.


level_path

ts
readonly static level_path: number = 1;

Engine enum value for game_object.level_path.


movement

ts
readonly static movement: number = 0;

Engine enum value for game_object.movement.


neutral

ts
readonly static neutral: number = 1;

Engine enum value for game_object.neutral.


no_path

ts
readonly static no_path: number = 3;

Engine enum value for game_object.no_path.


no_pda_msg

ts
readonly static no_pda_msg: number = 2;

Engine enum value for game_object.no_pda_msg.


object

ts
readonly static object: number = 5;

Engine enum value for game_object.object.


particle

ts
readonly static particle: number = 4;

Engine enum value for game_object.particle.


patrol_path

ts
readonly static patrol_path: number = 2;

Engine enum value for game_object.patrol_path.


REGISTRY

ts
static REGISTRY: Map<number, game_object>;

relation_attack

ts
readonly static relation_attack: number = 1;

Engine enum value for game_object.relation_attack.


relation_fight_help_human

ts
readonly static relation_fight_help_human: number = 2;

Engine enum value for game_object.relation_fight_help_human.


relation_fight_help_monster

ts
readonly static relation_fight_help_monster: number = 4;

Engine enum value for game_object.relation_fight_help_monster.


relation_kill

ts
readonly static relation_kill: number = 0;

Engine enum value for game_object.relation_kill.


sound

ts
readonly static sound: number = 3;

Engine enum value for game_object.sound.


watch

ts
readonly static watch: number = 1;

Engine enum value for game_object.watch.