Class: MockGameObject
Abstract game object mock.
Implements
game_object
Accessors
bleeding
Get Signature
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
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
| Parameter | Type |
|---|---|
delta | number |
Returns
void
Implementation of
game_object.bleedinghealth
Get Signature
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
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
| Parameter | Type |
|---|---|
delta | number |
Returns
void
Implementation of
game_object.healthmorale
Get Signature
get morale(): number;Creature morale value.
Remarks
Assignment applies a delta through CScriptGameObject::SetMorale, not an absolute value.
Returns
number
Set Signature
set morale(delta: number): void;Creature morale value.
Remarks
Assignment applies a delta through CScriptGameObject::SetMorale, not an absolute value.
Parameters
| Parameter | Type |
|---|---|
delta | number |
Returns
void
Implementation of
game_object.moralepower
Get Signature
get power(): number;Actor stamina/power value.
Remarks
Assignment applies a delta through CScriptGameObject::SetPower, not an absolute value.
Returns
number
Set Signature
set power(delta: number): void;Actor stamina/power value.
Remarks
Assignment applies a delta through CScriptGameObject::SetPower, not an absolute value.
Parameters
| Parameter | Type |
|---|---|
delta | number |
Returns
void
Implementation of
game_object.powerpsy_health
Get Signature
get psy_health(): number;Psy health value.
Remarks
Assignment applies a delta through CScriptGameObject::SetPsyHealth, not an absolute value.
Returns
number
Set Signature
set psy_health(delta: number): void;Psy health value.
Remarks
Assignment applies a delta through CScriptGameObject::SetPsyHealth, not an absolute value.
Parameters
| Parameter | Type |
|---|---|
delta | number |
Returns
void
Implementation of
game_object.psy_healthradiation
Get Signature
get radiation(): number;Actor radiation value.
Remarks
Assignment applies a delta through CScriptGameObject::SetRadiation, not an absolute value.
Returns
number
Set Signature
set radiation(delta: number): void;Actor radiation value.
Remarks
Assignment applies a delta through CScriptGameObject::SetRadiation, not an absolute value.
Parameters
| Parameter | Type |
|---|---|
delta | number |
Returns
void
Implementation of
game_object.radiationsatiety
Get Signature
get satiety(): number;Actor satiety value.
Remarks
Assignment applies a delta through CScriptGameObject::ChangeSatiety, not an absolute value.
Returns
number
Set Signature
set satiety(delta: number): void;Actor satiety value.
Remarks
Assignment applies a delta through CScriptGameObject::ChangeSatiety, not an absolute value.
Parameters
| Parameter | Type |
|---|---|
delta | number |
Returns
void
Implementation of
game_object.satietyConstructors
Constructor
new MockGameObject(config?: IMockGameObjectConfig): MockGameObject;Parameters
| Parameter | Type |
|---|---|
config | IMockGameObjectConfig |
Returns
MockGameObject
Methods
asGameObject()
asGameObject(): game_object;Returns
game_object
asMock()
static asMock(object: game_object): MockGameObject;Parameters
| Parameter | Type |
|---|---|
object | game_object |
Returns
MockGameObject
callCallback()
static callCallback(
object: game_object,
id: TXR_callback, ...
args: any[]): void;Parameters
| Parameter | Type |
|---|---|
object | game_object |
id | TXR_callback |
...args | any[] |
Returns
void
clamp()
static clamp(
value: number,
min: number,
max: number): number;Parameters
| Parameter | Type |
|---|---|
value | number |
min | number |
max | number |
Returns
number
create()
static create(config?: IMockGameObjectConfig): MockGameObject;Parameters
| Parameter | Type |
|---|---|
config | IMockGameObjectConfig |
Returns
MockGameObject
createActor()
static createActor(config?: IMockGameObjectConfig): MockGameObject;Parameters
| Parameter | Type |
|---|---|
config | IMockGameObjectConfig |
Returns
MockGameObject
mock()
static mock(config?: IMockGameObjectConfig): game_object;Parameters
| Parameter | Type |
|---|---|
config | IMockGameObjectConfig |
Returns
game_object
mockActor()
static mockActor(config?: IMockGameObjectConfig): game_object;Parameters
| Parameter | Type |
|---|---|
config | IMockGameObjectConfig |
Returns
game_object
mockHelicopter()
static mockHelicopter(config?: IMockGameObjectConfig): game_object;Parameters
| Parameter | Type |
|---|---|
config | IMockGameObjectConfig |
Returns
game_object
mockStalker()
static mockStalker(base?: IMockGameObjectConfig): game_object;Parameters
| Parameter | Type |
|---|---|
base | IMockGameObjectConfig |
Returns
game_object
mockWithClassId()
static mockWithClassId(clsid: number): game_object;Parameters
| Parameter | Type |
|---|---|
clsid | number |
Returns
game_object
mockWithSection()
static mockWithSection(section: string): game_object;Parameters
| Parameter | Type |
|---|---|
section | string |
Returns
game_object
Properties
accessible
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
game_object.accessibleaccessible_nearest
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
game_object.accessible_nearestaccuracy
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
game_object.accuracyaction
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
game_object.actionaction_by_index
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
game_object.action_by_indexaction_count
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
game_object.action_countactivate_slot
activate_slot: Mock<UnknownFunction>;Activate an inventory slot.
Param
index
Slot id.
Implementation of
game_object.activate_slotactive_detector
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
game_object.active_detectoractive_item
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
game_object.active_itemactive_slot
active_slot: MockedFunction<<T>() => T>;Returns
Active item slot of game object.
Implementation of
game_object.active_slotactive_sound_count
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
game_object.active_sound_countactive_zone_contact
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
game_object.active_zone_contactactor_look_at_point
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
game_object.actor_look_at_pointadd_animation
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
game_object.add_animationadd_combat_sound
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
game_object.add_combat_soundadd_restrictions
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
game_object.add_restrictionsadd_sound
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
game_object.add_soundadd_upgrade
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
game_object.add_upgradeaim_bone_id
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
game_object.aim_bone_idaim_time
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
game_object.aim_timealive
alive: Mock<() => boolean>;Returns
Whether game object is alive.
Implementation of
game_object.aliveallow_break_talk_dialog
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
game_object.allow_break_talk_dialogallow_sprint
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
game_object.allow_sprintammo_box_size
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
game_object.ammo_box_sizeammo_get_count
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
game_object.ammo_get_countammo_set_count
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
game_object.ammo_set_countanimation_count
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
game_object.animation_countanimation_slot
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
game_object.animation_slotapply_loophole_direction_distance
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
game_object.apply_loophole_direction_distanceattach_vehicle
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
game_object.attach_vehicleattachable_item_enabled
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
game_object.attachable_item_enabledattachable_item_load_attach
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
game_object.attachable_item_load_attachbase_in_restrictions
base_in_restrictions: MockedFunction<() => string>;Returns
Base incoming restriction list.
Implementation of
game_object.base_in_restrictionsbase_out_restrictions
base_out_restrictions: MockedFunction<() => string>;Get base outside restrictions.
Remarks
Requires an object with AI path restriction support.
Returns
Restriction list.
Implementation of
game_object.base_out_restrictionsbelt_count
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
game_object.belt_countberserk
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
game_object.berserkbest_cover
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
game_object.best_coverbest_danger
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
game_object.best_dangerbest_enemy
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
game_object.best_enemybest_item
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
game_object.best_itembest_weapon
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
game_object.best_weaponbind_object
bind_object: Mock<UnknownFunction>;Attach a Lua binder to this object.
Param
binder
Binder instance adopted by the engine.
Implementation of
game_object.bind_objectbinded_object
binded_object: MockedFunction<() => object_binder>;Get attached Lua binder.
Returns
Bound object binder.
Implementation of
game_object.binded_objectbody_state
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
game_object.body_statebone_position
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
game_object.bone_positionbone_visible
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
game_object.bone_visibleburer_get_force_gravi_attack
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
game_object.burer_get_force_gravi_attackburer_set_force_gravi_attack
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
game_object.burer_set_force_gravi_attackbuy_condition
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
game_object.buy_conditionbuy_item_condition_factor
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
game_object.buy_item_condition_factorbuy_supplies
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
game_object.buy_suppliescallbacks
callbacks: Partial<Record<TXR_callback, (this: void, ...args: any[]) => any>> = {};callCallback
callCallback: Mock<(id: TXR_callback, ...args: any[]) => any>;can_add_upgrade
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
game_object.can_add_upgradecan_install_upgrade
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
game_object.can_install_upgradecan_script_capture
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
game_object.can_script_capturecan_select_weapon
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
game_object.can_select_weaponcan_throw_grenades
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
game_object.can_throw_grenadescast_Actor
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
game_object.cast_Actorcast_Ammo
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
game_object.cast_Ammocast_Artefact
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
game_object.cast_Artefactcast_Car
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
game_object.cast_Carcast_CustomZone
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
game_object.cast_CustomZonecast_EntityAlive
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
game_object.cast_EntityAlivecast_Explosive
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
game_object.cast_Explosivecast_GameObject
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
game_object.cast_GameObjectcast_Heli
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
game_object.cast_Helicast_HolderCustom
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
game_object.cast_HolderCustomcast_InventoryItem
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
game_object.cast_InventoryItemcast_InventoryOwner
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
game_object.cast_InventoryOwnercast_Monster
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
game_object.cast_Monstercast_PhysicsShellHolder
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
game_object.cast_PhysicsShellHoldercast_ScriptZone
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
game_object.cast_ScriptZonecast_SpaceRestrictor
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
game_object.cast_SpaceRestrictorcast_Stalker
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
game_object.cast_Stalkercast_Weapon
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
game_object.cast_Weaponcast_WeaponMagazined
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
game_object.cast_WeaponMagazinedcenter
center: Mock<() => vector>;Get object center position.
Returns
Center position.
Implementation of
game_object.centerchange_character_rank
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
game_object.change_character_rankchange_character_reputation
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
game_object.change_character_reputationchange_goodwill
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
game_object.change_goodwillchange_team
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
game_object.change_teamcharacter_community
character_community: MockedFunction<<T>() => T>;Returns
Object community like monolith, stalker or zombied.
Implementation of
game_object.character_communitycharacter_icon
character_icon: <T>() => T;Get character icon id.
Type Parameters
| Type Parameter |
|---|
T |
Returns
T
Icon id.
Implementation of
game_object.character_iconcharacter_name
character_name: MockedFunction<<T>() => T>;Get localized character name.
Returns
Character display name.
Implementation of
game_object.character_namecharacter_rank
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
game_object.character_rankcharacter_reputation
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
game_object.character_reputationclear_animations
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
game_object.clear_animationsclear_callbacks
clear_callbacks: Mock<() => void>;Clear all callbacks registered on this object.
Implementation of
game_object.clear_callbacksclear_game_news
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
game_object.clear_game_newsclear_override_animation
clear_override_animation: Mock<UnknownFunction>;Clear override animation.
Implementation of
game_object.clear_override_animationclsid
clsid: Mock<() => TXR_class_id>;Get engine class id.
Returns
Class id constant.
Implementation of
game_object.clsidcommand
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
game_object.commandcommunity
community: Mock<() => string>;community_goodwill
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
game_object.community_goodwillcondition
condition: MockedFunction<() => number>;Get item condition.
Remarks
Requires an inventory item or another object with condition/durability data.
Returns
Condition value.
Implementation of
game_object.conditioncost
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
game_object.costcritically_wounded
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
game_object.critically_woundeddeadbody_can_take
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
game_object.deadbody_can_takedeadbody_can_take_status
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
game_object.deadbody_can_take_statusdeadbody_closed
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
game_object.deadbody_closeddeadbody_closed_status
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
game_object.deadbody_closed_statusdeath_sound_enabled
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
game_object.death_sound_enableddeath_time
death_time: MockedFunction<() => number>;Get object death time.
Returns
Death time.
Implementation of
game_object.death_timedebug_planner
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
game_object.debug_plannerdetach_vehicle
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
game_object.detach_vehicledetail_path_type
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
game_object.detail_path_typedirection
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
game_object.directiondisable_anomaly
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
game_object.disable_anomalydisable_hit_marks
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
game_object.disable_hit_marksdisable_info_portion
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
game_object.disable_info_portiondisable_inv_upgrade
disable_inv_upgrade: MockedFunction<() => void>;Disable inventory upgrades for this object.
Implementation of
game_object.disable_inv_upgradedisable_show_hide_sounds
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
game_object.disable_show_hide_soundsdisable_talk
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
game_object.disable_talkdisable_trade
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
game_object.disable_tradedisabledInventoryUpgrades
disabledInventoryUpgrades: Set<string>;dont_has_info
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
game_object.dont_has_infodrop_item
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
game_object.drop_itemdrop_item_and_teleport
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
game_object.drop_item_and_teleporteat
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
game_object.eatenable_anomaly
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
game_object.enable_anomalyenable_attachable_item
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
game_object.enable_attachable_itemenable_inv_upgrade
enable_inv_upgrade: MockedFunction<() => void>;Enable inventory upgrades for this object.
Implementation of
game_object.enable_inv_upgradeenable_level_changer
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
game_object.enable_level_changerenable_memory_object
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
game_object.enable_memory_objectenable_night_vision
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
game_object.enable_night_visionenable_talk
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
game_object.enable_talkenable_torch
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
game_object.enable_torchenable_trade
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
game_object.enable_tradeenable_vision
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
game_object.enable_visionexplode
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
game_object.explodeexternal_sound_start
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
game_object.external_sound_startexternal_sound_stop
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
game_object.external_sound_stopextrapolate_length
extrapolate_length: MockedFunction<{
(): number;
(value: number): void;
}>;Returns
Movement path extrapolation length.
Implementation of
game_object.extrapolate_lengthfake_death_fall_down
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
game_object.fake_death_fall_downfake_death_stand_up
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
game_object.fake_death_stand_upfind_best_cover
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
game_object.find_best_coverforce_set_goodwill
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
game_object.force_set_goodwillforce_set_position
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
game_object.force_set_positionforce_stand_sleep_animation
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
game_object.force_stand_sleep_animationforce_visibility_state
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
game_object.force_visibility_statefov
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
game_object.fovgame_vertex_id
game_vertex_id: Mock<() => number>;Get current game graph vertex id.
Returns
Game vertex id.
Implementation of
game_object.game_vertex_idgeneral_goodwill
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
game_object.general_goodwillget_actor_jump_speed
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
game_object.get_actor_jump_speedget_actor_max_walk_weight
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
game_object.get_actor_max_walk_weightget_actor_max_weight
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
game_object.get_actor_max_weightget_actor_relation_flags
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
game_object.get_actor_relation_flagsget_actor_run_coef
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
game_object.get_actor_run_coefget_actor_runback_coef
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
game_object.get_actor_runback_coefget_actor_sprint_koef
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
game_object.get_actor_sprint_koefget_additional_max_walk_weight
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
game_object.get_additional_max_walk_weightget_additional_max_weight
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
game_object.get_additional_max_weightget_ammo_count_for_type
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
game_object.get_ammo_count_for_typeget_ammo_in_magazine
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
game_object.get_ammo_in_magazineget_ammo_total
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
game_object.get_ammo_totalget_ammo_type
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
game_object.get_ammo_typeget_anomaly_power
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
game_object.get_anomaly_powerget_artefact
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
game_object.get_artefactget_artefact_bleeding
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
game_object.get_artefact_bleedingget_artefact_health
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
game_object.get_artefact_healthget_artefact_power
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
game_object.get_artefact_powerget_artefact_radiation
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
game_object.get_artefact_radiationget_artefact_satiety
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
game_object.get_artefact_satietyget_attached_vehicle
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
game_object.get_attached_vehicleget_bone_id
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
game_object.get_bone_idget_campfire
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
game_object.get_campfireget_car
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
game_object.get_carget_corpse
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
game_object.get_corpseget_current_direction
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
game_object.get_current_directionget_current_holder
get_current_holder: MockedFunction<() => Nullable<holder>>;Returns
Current holder used by the actor, or null.
Implementation of
game_object.get_current_holderget_current_outfit
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
game_object.get_current_outfitget_current_outfit_protection
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
game_object.get_current_outfit_protectionget_current_point_index
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
game_object.get_current_point_indexget_dest_smart_cover
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
game_object.get_dest_smart_coverget_dest_smart_cover_name
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
game_object.get_dest_smart_cover_nameget_enemy
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
game_object.get_enemyget_enemy_strength
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
game_object.get_enemy_strengthget_force_anti_aim
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
game_object.get_force_anti_aimget_hanging_lamp
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
game_object.get_hanging_lampget_helicopter
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
game_object.get_helicopterget_holder_class
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
game_object.get_holder_classget_info_time
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
game_object.get_info_timeget_luminocity
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
game_object.get_luminocityget_luminocity_hemi
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
game_object.get_luminocity_hemiget_main_weapon_type
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
game_object.get_main_weapon_typeget_max_uses
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
game_object.get_max_usesget_monster_hit_info
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
game_object.get_monster_hit_infoget_movement_speed
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
game_object.get_movement_speedget_physics_object
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
game_object.get_physics_objectget_physics_shell
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
game_object.get_physics_shellget_remaining_uses
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
game_object.get_remaining_usesget_restrictor_type
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
game_object.get_restrictor_typeget_script
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
game_object.get_scriptget_script_name
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
game_object.get_script_nameget_smart_cover_description
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
game_object.get_smart_cover_descriptionget_sound_info
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
game_object.get_sound_infoget_spatial_type
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
game_object.get_spatial_typeget_start_dialog
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
game_object.get_start_dialogget_state
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
game_object.get_stateget_task
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
game_object.get_taskget_task_state
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
game_object.get_task_stateget_total_weight
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
game_object.get_total_weightget_visibility_state
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
game_object.get_visibility_stateget_visual_name
get_visual_name: MockedFunction<<T>() => T>;Returns
Visual name assigned to this object.
Implementation of
game_object.get_visual_nameget_weapon_substate
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
game_object.get_weapon_substateget_weapon_type
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
game_object.get_weapon_typegive_game_news
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
game_object.give_game_newsgive_info_portion
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
game_object.give_info_portiongive_money
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
game_object.give_moneygive_talk_message
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
game_object.give_talk_messagegive_talk_message2
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
game_object.give_talk_message2give_task
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
game_object.give_taskgoodwill
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
game_object.goodwillgroup
group: Mock<() => number>;Get object group id.
Returns
Group id.
Implementation of
game_object.groupgroup_throw_time_interval
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
game_object.group_throw_time_intervalhas_ammo_type
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
game_object.has_ammo_typehas_info
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
game_object.has_infohas_upgrade
has_upgrade: MockedFunction<(upgrade_section: string) => boolean>;Param
upgrade_section
Section of upgrade to check.
Returns
Whether upgrade is installed.
Implementation of
game_object.has_upgradehas_upgrade_group
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
game_object.has_upgrade_grouphas_upgrade_group_by_upgrade_id
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
game_object.has_upgrade_group_by_upgrade_idhead_orientation
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
game_object.head_orientationhide_weapon
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
game_object.hide_weaponhit
hit: Mock<UnknownFunction>;Apply a hit descriptor to this object.
Param
hit
Hit descriptor.
Implementation of
game_object.hitid
id: Mock<() => number>;Get engine object id.
Returns
Runtime object id.
Implementation of
game_object.ididle_max_time
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
game_object.idle_max_timeidle_min_time
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
game_object.idle_min_timeignore_monster_threshold
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
game_object.ignore_monster_thresholdin_current_loophole_fov
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
game_object.in_current_loophole_fovin_current_loophole_range
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
game_object.in_current_loophole_rangein_loophole_fov
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
game_object.in_loophole_fovin_loophole_range
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
game_object.in_loophole_rangein_restrictions
in_restrictions: Mock<() => string>;Remarks
Requires an object with AI path restriction support.
Returns
Active input restriction names.
Implementation of
game_object.in_restrictionsin_smart_cover
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
game_object.in_smart_coverinactualize_game_path
inactualize_game_path: MockedFunction<() => void>;Mark game path cache as outdated.
Implementation of
game_object.inactualize_game_pathinactualize_level_path
inactualize_level_path: MockedFunction<() => void>;Mark level path cache as outdated.
Implementation of
game_object.inactualize_level_pathinactualize_patrol_path
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
game_object.inactualize_patrol_pathinfo_add
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
game_object.info_addinfo_clear
info_clear: Mock<() => void>;Reset debugging information about object. Available only for debug builds.
Implementation of
game_object.info_clearinside
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
game_object.insideinstall_upgrade
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
game_object.install_upgradeinv_box_can_take
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
game_object.inv_box_can_takeinv_box_can_take_status
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
game_object.inv_box_can_take_statusinv_box_closed
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
game_object.inv_box_closedinv_box_closed_status
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
game_object.inv_box_closed_statusinventory_for_each
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
game_object.inventory_for_eachinvulnerable
invulnerable: MockedFunction<{
(): boolean;
(value: boolean): void;
}>;Returns
Whether this monster ignores damage.
Implementation of
game_object.invulnerableis_active_task
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
game_object.is_active_taskis_actor
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
game_object.is_actoris_ammo
is_ammo: MockedFunction<() => boolean>;Check whether this object is ammo.
Since
OpenXRay 2017-08-15, 565b39e5
Returns
Whether this object is ammo.
Implementation of
game_object.is_ammois_anomaly
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
game_object.is_anomalyis_artefact
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
game_object.is_artefactis_body_turning
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
game_object.is_body_turningis_custom_monster
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
game_object.is_custom_monsteris_door_blocked_by_npc
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
game_object.is_door_blocked_by_npcis_door_locked_for_npc
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
game_object.is_door_locked_for_npcis_entity_alive
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
game_object.is_entity_aliveis_grenade_launcher
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
game_object.is_grenade_launcheris_hud_item
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
game_object.is_hud_itemis_inv_box_empty
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
game_object.is_inv_box_emptyis_inv_upgrade_enabled
is_inv_upgrade_enabled: MockedFunction<() => boolean>;Returns
Whether inventory upgrade interaction is enabled.
Implementation of
game_object.is_inv_upgrade_enabledis_inventory_box
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
game_object.is_inventory_boxis_inventory_item
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
game_object.is_inventory_itemis_inventory_owner
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
game_object.is_inventory_owneris_level_changer_enabled
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
game_object.is_level_changer_enabledis_monster
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
game_object.is_monsteris_on_belt
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
game_object.is_on_beltis_outfit
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
game_object.is_outfitis_scope
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
game_object.is_scopeis_silencer
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
game_object.is_silenceris_space_restrictor
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
game_object.is_space_restrictoris_stalker
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
game_object.is_stalkeris_talk_enabled
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
game_object.is_talk_enabledis_talking
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
game_object.is_talkingis_there_items_to_pickup
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
game_object.is_there_items_to_pickupis_trade_enabled
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
game_object.is_trade_enabledis_trader
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
game_object.is_traderis_weapon
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
game_object.is_weaponis_weapon_gl
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
game_object.is_weapon_glis_weapon_going_to_be_strapped
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
game_object.is_weapon_going_to_be_strappedis_weapon_magazined
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
game_object.is_weapon_magazinedisDeadBodyCanTake
isDeadBodyCanTake: boolean = true;isDeadBodyClosed
isDeadBodyClosed: boolean = false;isDoorLockedForNpc
isDoorLockedForNpc: boolean = false;isInventoryBoxCanTake
isInventoryBoxCanTake: boolean = true;isInventoryBoxClosed
isInventoryBoxClosed: boolean = false;isInvulnerable
isInvulnerable: boolean = false;isMarkedDropped
isMarkedDropped: boolean = false;isVisible
isVisible: boolean = true;isVisualMemoryEnabled
isVisualMemoryEnabled: boolean = true;item_in_slot
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
game_object.item_in_slotitem_on_belt
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
game_object.item_on_beltiterate_feel_touch
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
game_object.iterate_feel_touchiterate_installed_upgrades
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
game_object.iterate_installed_upgradesiterate_inventory
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
game_object.iterate_inventoryiterate_inventory_box
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
game_object.iterate_inventory_boxjump
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
game_object.jumpkill
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
game_object.killlevel_vertex_id
level_vertex_id: Mock<() => number>;Get current level vertex id.
Returns
Level vertex id.
Implementation of
game_object.level_vertex_idlocation_on_path
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
game_object.location_on_pathlock_door_for_npc
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
game_object.lock_door_for_npclookout_max_time
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
game_object.lookout_max_timelookout_min_time
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
game_object.lookout_min_timemake_item_active
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
game_object.make_item_activemake_object_visible_somewhen
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
game_object.make_object_visible_somewhenmark_item_dropped
mark_item_dropped: MockedFunction<(object: game_object) => void>;Mark an inventory item as dropped.
Param
object
Item object.
Implementation of
game_object.mark_item_droppedmarked_dropped
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
game_object.marked_droppedmass
mass: MockedFunction<() => number>;Returns
Physics mass of this object.
Implementation of
game_object.massmax_health
max_health: MockedFunction<() => number>;Returns
Maximum health for this entity.
Implementation of
game_object.max_healthmax_ignore_monster_distance
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
game_object.max_ignore_monster_distancememory_hit_objects
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
game_object.memory_hit_objectsmemory_position
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
game_object.memory_positionmemory_sound_objects
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
game_object.memory_sound_objectsmemory_time
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
game_object.memory_timememory_visible_objects
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
game_object.memory_visible_objectsmental_state
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
game_object.mental_statemoney
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
game_object.moneymotivation_action_manager
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
game_object.motivation_action_managermovement_enabled
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
game_object.movement_enabledmovement_target_reached
movement_target_reached: MockedFunction<() => boolean>;Check whether current movement target is reached.
Returns
Whether movement target is reached.
Implementation of
game_object.movement_target_reachedmovement_type
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
game_object.movement_typename
name: Mock<() => string>;Get runtime object name.
Returns
Object name.
Implementation of
game_object.namenight_vision_enabled
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
game_object.night_vision_enablednot_yet_visible_objects
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
game_object.not_yet_visible_objectsobject
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
game_object.objectobject_count
object_count: Mock<() => number>;Get inventory object count.
Returns
Inventory item count.
Implementation of
game_object.object_countobjectActionManager
objectActionManager: MockActionPlanner;objectAlive
objectAlive: boolean;objectAmmoCount
objectAmmoCount: number = 0;objectAmmoElapsed
objectAmmoElapsed: number = 0;objectAmmoType
objectAmmoType: number = 0;objectBleeding
objectBleeding: number;objectCenter
objectCenter: vector;objectCharacterRank
objectCharacterRank: number | null;objectClsid
objectClsid: TXR_class_id;objectCommunity
objectCommunity: string;objectDirection
objectDirection: vector;objectGameVertexId
objectGameVertexId: number;objectHealth
objectHealth: number;objectId
objectId: number;objectInfoPortions
objectInfoPortions: string[];objectInRestrictions
objectInRestrictions: string[];objectInventory
objectInventory: Map<string | number, game_object>;objectLevelVertexId
objectLevelVertexId: number;objectMaxUses
objectMaxUses: number = 1;objectMoney
objectMoney: number;objectMorale
objectMorale: number;objectName
objectName: string;objectOutRestrictions
objectOutRestrictions: string[];objectPosition
objectPosition: vector;objectPower
objectPower: number;objectPsyHealth
objectPsyHealth: number;objectRadiation
objectRadiation: number;objectRank
objectRank: number;objectRemainingUses
objectRemainingUses: number = 1;objectRestrictorType
objectRestrictorType: number = 0;objectSatiety
objectSatiety: number;objectSection
objectSection: string;objectSpatialType
objectSpatialType: number = 0;objectSpawnIni
objectSpawnIni: ini_file | null;objectTaskStates
objectTaskStates: Map<string, number>;objectUpgradesSet
objectUpgradesSet: Set<string>;objectVisual
objectVisual: string = "object_visual_name";objectWeight
objectWeight: number = 0;on_door_is_closed
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
game_object.on_door_is_closedon_door_is_open
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
game_object.on_door_is_openout_restrictions
out_restrictions: Mock<() => string>;Returns
Current outgoing restriction list.
Implementation of
game_object.out_restrictionsparent
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
game_object.parentpath_completed
path_completed: MockedFunction<() => boolean>;Check whether current path is complete.
Returns
Whether path was completed.
Implementation of
game_object.path_completedpath_type
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
game_object.path_typepatrol
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
game_object.patrolpatrol_path_make_inactual
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
game_object.patrol_path_make_inactualphantom_set_enemy
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
game_object.phantom_set_enemyplay_cycle
play_cycle: Mock<UnknownFunction>;Play a model animation cycle.
Param
animation
Animation name.
Param
mix_in
Whether to blend with current animation.
Implementation of
game_object.play_cycleplay_hud_motion
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
game_object.play_hud_motionplay_sound
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
game_object.play_soundpoltergeist_get_actor_ignore
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
game_object.poltergeist_get_actor_ignorepoltergeist_set_actor_ignore
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
game_object.poltergeist_set_actor_ignoreposition
position: Mock<() => vector>;Get current world position.
Returns
Position vector.
Implementation of
game_object.positionprofile_name
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
game_object.profile_namerange
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
game_object.rangerank
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
game_object.rankregister_door_for_npc
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
game_object.register_door_for_npcregister_in_combat
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
game_object.register_in_combatrelation
relation: MockedFunction<(object: game_object) => TXR_relation>;Get relation to another object.
Param
object
Target object.
Returns
Relation id.
Implementation of
game_object.relationrelease_stand_sleep_animation
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
game_object.release_stand_sleep_animationremove_all_restrictions
remove_all_restrictions: MockedFunction<() => void>;Clear all space restrictions from this object.
Implementation of
game_object.remove_all_restrictionsremove_danger
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
game_object.remove_dangerremove_home
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
game_object.remove_homeremove_memory_hit_object
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
game_object.remove_memory_hit_objectremove_memory_sound_object
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
game_object.remove_memory_sound_objectremove_memory_visible_object
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
game_object.remove_memory_visible_objectremove_restrictions
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
game_object.remove_restrictionsremove_sound
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
game_object.remove_soundreset_action_queue
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
game_object.reset_action_queuereset_bone_protections
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
game_object.reset_bone_protectionsrestore_default_start_dialog
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
game_object.restore_default_start_dialogrestore_ignore_monster_threshold
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
game_object.restore_ignore_monster_thresholdrestore_max_ignore_monster_distance
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
game_object.restore_max_ignore_monster_distancerestore_sound_threshold
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
game_object.restore_sound_thresholdrestore_weapon
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
game_object.restore_weaponrun_talk_dialog
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
game_object.run_talk_dialogsafe_cover
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
game_object.safe_coverscript
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
game_object.scriptsection
section: MockedFunction<<T>() => T>;Returns
Config section name of this object.
Implementation of
game_object.sectionsee
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
game_object.seesell_condition
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
game_object.sell_conditionset__force
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
game_object.set__forceset_active_task
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
game_object.set_active_taskset_actor_direction
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
game_object.set_actor_directionset_actor_jump_speed
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
game_object.set_actor_jump_speedset_actor_max_walk_weight
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
game_object.set_actor_max_walk_weightset_actor_max_weight
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
game_object.set_actor_max_weightset_actor_position
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
game_object.set_actor_positionset_actor_relation_flags
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
game_object.set_actor_relation_flagsset_actor_run_coef
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
game_object.set_actor_run_coefset_actor_runback_coef
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
game_object.set_actor_runback_coefset_actor_sprint_koef
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
game_object.set_actor_sprint_koefset_additional_max_walk_weight
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
game_object.set_additional_max_walk_weightset_additional_max_weight
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
game_object.set_additional_max_weightset_alien_control
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
game_object.set_alien_controlset_ammo_elapsed
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
game_object.set_ammo_elapsedset_ammo_type
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
game_object.set_ammo_typeset_anomaly_power
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
game_object.set_anomaly_powerset_artefact_bleeding
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
game_object.set_artefact_bleedingset_artefact_health
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
game_object.set_artefact_healthset_artefact_power
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
game_object.set_artefact_powerset_artefact_radiation
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
game_object.set_artefact_radiationset_artefact_satiety
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
game_object.set_artefact_satietyset_body_state
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
game_object.set_body_stateset_bone_visible
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
game_object.set_bone_visibleset_callback
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
game_object.set_callbackset_capture_anim
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
game_object.set_capture_animset_character_community
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
game_object.set_character_communityset_character_icon
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
game_object.set_character_iconset_character_rank
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
game_object.set_character_rankset_character_reputation
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
game_object.set_character_reputationset_collision_off
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
game_object.set_collision_offset_community_goodwill
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
game_object.set_community_goodwillset_condition
set_condition: Mock<UnknownFunction>;Set item condition.
Param
condition
New condition value.
Implementation of
game_object.set_conditionset_const_force
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
game_object.set_const_forceset_custom_panic_threshold
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
game_object.set_custom_panic_thresholdset_default_panic_threshold
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
game_object.set_default_panic_thresholdset_desired_direction
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
game_object.set_desired_directionset_desired_position
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
game_object.set_desired_positionset_dest_game_vertex_id
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
game_object.set_dest_game_vertex_idset_dest_level_vertex_id
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
game_object.set_dest_level_vertex_idset_dest_loophole
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
game_object.set_dest_loopholeset_dest_smart_cover
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
game_object.set_dest_smart_coverset_detail_path_type
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
game_object.set_detail_path_typeset_enemy
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
game_object.set_enemyset_enemy_callback
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
game_object.set_enemy_callbackset_fastcall
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
game_object.set_fastcallset_force_anti_aim
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
game_object.set_force_anti_aimset_fov
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
game_object.set_fovset_goodwill
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
game_object.set_goodwillset_health_ex
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
game_object.set_health_exset_home
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
game_object.set_homeset_invisible
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
game_object.set_invisibleset_item
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
game_object.set_itemset_level_changer_invitation
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
game_object.set_level_changer_invitationset_main_weapon_type
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
game_object.set_main_weapon_typeset_manual_invisibility
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
game_object.set_manual_invisibilityset_mental_state
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
game_object.set_mental_stateset_movement_selection_type
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
game_object.set_movement_selection_typeset_movement_type
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
game_object.set_movement_typeset_nonscript_usable
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
game_object.set_nonscript_usableset_npc_position
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
game_object.set_npc_positionset_override_animation
set_override_animation: MockedFunction<(animation: string) => void>;Force an override animation.
Param
animation
Animation name.
Implementation of
game_object.set_override_animationset_path_type
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
game_object.set_path_typeset_patrol_extrapolate_callback
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
game_object.set_patrol_extrapolate_callbackset_patrol_path
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
game_object.set_patrol_pathset_previous_point
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
game_object.set_previous_pointset_queue_size
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
game_object.set_queue_sizeset_range
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
game_object.set_rangeset_relation
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
game_object.set_relationset_remaining_uses
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
game_object.set_remaining_usesset_restrictor_type
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
game_object.set_restrictor_typeset_sight
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
game_object.set_sightset_smart_cover_target
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
game_object.set_smart_cover_targetset_smart_cover_target_default
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
game_object.set_smart_cover_target_defaultset_smart_cover_target_fire
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
game_object.set_smart_cover_target_fireset_smart_cover_target_fire_no_lookout
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
game_object.set_smart_cover_target_fire_no_lookoutset_smart_cover_target_idle
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
game_object.set_smart_cover_target_idleset_smart_cover_target_lookout
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
game_object.set_smart_cover_target_lookoutset_smart_cover_target_selector
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
game_object.set_smart_cover_target_selectorset_sound_mask
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
game_object.set_sound_maskset_sound_threshold
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
game_object.set_sound_thresholdset_spatial_type
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
game_object.set_spatial_typeset_start_dialog
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
game_object.set_start_dialogset_start_point
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
game_object.set_start_pointset_sympathy
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
game_object.set_sympathyset_task_state
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
game_object.set_task_stateset_tip_text
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
game_object.set_tip_textset_tip_text_default
set_tip_text_default: MockedFunction<() => void>;Restore default usable-object tip text.
Implementation of
game_object.set_tip_text_defaultset_trader_global_anim
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
game_object.set_trader_global_animset_trader_head_anim
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
game_object.set_trader_head_animset_trader_sound
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
game_object.set_trader_soundset_vis_state
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
game_object.set_vis_stateset_visual_memory_enabled
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
game_object.set_visual_memory_enabledset_visual_name
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
game_object.set_visual_nameset_weapon_type
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
game_object.set_weapon_typeset_weight
set_weight: Mock<(value: number) => void>;Set carried object weight.
Since
OpenXRay 2016-04-12, 1a206d71
Param
weight
New weight.
Implementation of
game_object.set_weightshow_condition
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
game_object.show_conditionsight
sight: TXR_SightType = MockSightParameters.eSightTypeDummy;sight_params
sight_params: Mock<() => MockSightParameters>;Remarks
Requires a stalker or another AI object with a sight manager.
Returns
Current sight parameters.
Implementation of
game_object.sight_paramsskip_transfer_enemy
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
game_object.skip_transfer_enemysniper_fire_mode
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
game_object.sniper_fire_modesniper_update_rate
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
game_object.sniper_update_ratesound_prefix
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
game_object.sound_prefixsound_voice_prefix
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
game_object.sound_voice_prefixspawn_ini
spawn_ini: Mock<() => ini_file | null>;Returns
Spawn ini attached to this object, or null.
Implementation of
game_object.spawn_inispecial_danger_move
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
game_object.special_danger_movesquad
squad: Mock<() => number>;Returns
Game object squad id.
Implementation of
game_object.squadstart_particles
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
game_object.start_particlesstart_trade
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
game_object.start_tradestart_upgrade
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
game_object.start_upgradestop_particles
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
game_object.stop_particlesstop_talk
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
game_object.stop_talkstory_id
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
game_object.story_idsuitable_smart_cover
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
game_object.suitable_smart_coverswitch_state
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
game_object.switch_stateswitch_to_talk
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
game_object.switch_to_talkswitch_to_trade
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
game_object.switch_to_tradeswitch_to_upgrade
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
game_object.switch_to_upgradesympathy
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
game_object.sympathytake_items_enabled
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
game_object.take_items_enabledtarget_body_state
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
game_object.target_body_statetarget_mental_state
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
game_object.target_mental_statetarget_movement_type
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
game_object.target_movement_typeteam
team: Mock<() => number>;Returns
Object team id.
Implementation of
game_object.teamtorch_enabled
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
game_object.torch_enabledtransfer_item
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
game_object.transfer_itemtransfer_money
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
game_object.transfer_moneyunload_magazine
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
game_object.unload_magazineunlock_door_for_npc
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
game_object.unlock_door_for_npcunregister_door_for_npc
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
game_object.unregister_door_for_npcunregister_in_combat
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
game_object.unregister_in_combatuse
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
game_object.useuse_smart_covers_only
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
game_object.use_smart_covers_onlyvertex_in_direction
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
game_object.vertex_in_directionvisibility_threshold
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
game_object.visibility_thresholdvision_enabled
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
game_object.vision_enabledweapon_addon_attach
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
game_object.weapon_addon_attachweapon_addon_detach
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
game_object.weapon_addon_detachweapon_grenadelauncher_status
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
game_object.weapon_grenadelauncher_statusweapon_in_grenade_mode
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
game_object.weapon_in_grenade_modeweapon_is_grenadelauncher
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
game_object.weapon_is_grenadelauncherweapon_is_scope
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
game_object.weapon_is_scopeweapon_is_silencer
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
game_object.weapon_is_silencerweapon_scope_status
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
game_object.weapon_scope_statusweapon_silencer_status
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
game_object.weapon_silencer_statusweapon_strapped
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
game_object.weapon_strappedweapon_unstrapped
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
game_object.weapon_unstrappedweight
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
game_object.weightwho_hit_name
who_hit_name: MockedFunction<() => string>;Returns
Name of the object that last hit this object.
Implementation of
game_object.who_hit_namewho_hit_section_name
who_hit_section_name: MockedFunction<() => string>;Returns
Section name of the object that last hit this object.
Implementation of
game_object.who_hit_section_namewounded
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
game_object.woundedaction_type_count
readonly static action_type_count: number = 6;Engine enum value for game_object.action_type_count.
alifeMovementTypeMask
readonly static alifeMovementTypeMask: number = 0;Engine enum value for game_object.alifeMovementTypeMask.
alifeMovementTypeRandom
readonly static alifeMovementTypeRandom: number = 1;Engine enum value for game_object.alifeMovementTypeRandom.
animation
readonly static animation: number = 2;Engine enum value for game_object.animation.
dialog_pda_msg
readonly static dialog_pda_msg: number = 0;Engine enum value for game_object.dialog_pda_msg.
dummy
readonly static dummy: number = -1;Engine enum value for game_object.dummy.
enemy
readonly static enemy: number = 2;Engine enum value for game_object.enemy.
friend
readonly static friend: number = 0;Engine enum value for game_object.friend.
game_path
readonly static game_path: number = 0;Engine enum value for game_object.game_path.
info_pda_msg
readonly static info_pda_msg: number = 1;Engine enum value for game_object.info_pda_msg.
level_path
readonly static level_path: number = 1;Engine enum value for game_object.level_path.
movement
readonly static movement: number = 0;Engine enum value for game_object.movement.
neutral
readonly static neutral: number = 1;Engine enum value for game_object.neutral.
no_path
readonly static no_path: number = 3;Engine enum value for game_object.no_path.
no_pda_msg
readonly static no_pda_msg: number = 2;Engine enum value for game_object.no_pda_msg.
object
readonly static object: number = 5;Engine enum value for game_object.object.
particle
readonly static particle: number = 4;Engine enum value for game_object.particle.
patrol_path
readonly static patrol_path: number = 2;Engine enum value for game_object.patrol_path.
REGISTRY
static REGISTRY: Map<number, game_object>;relation_attack
readonly static relation_attack: number = 1;Engine enum value for game_object.relation_attack.
relation_fight_help_human
readonly static relation_fight_help_human: number = 2;Engine enum value for game_object.relation_fight_help_human.
relation_fight_help_monster
readonly static relation_fight_help_monster: number = 4;Engine enum value for game_object.relation_fight_help_monster.
relation_kill
readonly static relation_kill: number = 0;Engine enum value for game_object.relation_kill.
sound
readonly static sound: number = 3;Engine enum value for game_object.sound.
watch
readonly static watch: number = 1;Engine enum value for game_object.watch.