Class game_object

Client object base presentation as script object. Generic in-game entities from items to mutants and stalkers wrapped with luabind export.

Source

C++ class game_object

Custom Constructor

game_object

Hierarchy

Constructors

Properties

Methods

accessible accessible_nearest accuracy action action_by_index action_count activate_slot active_detector active_item active_slot active_sound_count active_zone_contact actor_look_at_point add_animation add_combat_sound add_restrictions add_sound add_upgrade aim_bone_id aim_time alive allow_break_talk_dialog allow_sprint ammo_box_size ammo_get_count ammo_set_count animation_count animation_slot apply_loophole_direction_distance attach_vehicle attachable_item_enabled attachable_item_load_attach base_in_restrictions base_out_restrictions belt_count berserk best_cover best_danger best_enemy best_item best_weapon bind_object binded_object body_state bone_position bone_visible burer_get_force_anti_aim burer_get_force_gravi_attack burer_set_force_gravi_attack buy_condition buy_item_condition_factor buy_supplies can_add_upgrade can_install_upgrade can_script_capture can_select_weapon can_throw_grenades cast_Ammo cast_Artefact cast_Car cast_CustomZone cast_EntityAlive cast_Explosive cast_GameObject cast_Heli cast_HolderCustom cast_PhysicsShellHolder cast_ScriptZone cast_SpaceRestrictor cast_Stalker cast_Weapon cast_WeaponMagazined center change_character_reputation change_goodwill change_team character_community character_icon character_name character_rank character_reputation clear_animations clear_callbacks clear_game_news clear_override_animation clsid command community_goodwill condition cost critically_wounded deadbody_can_take deadbody_can_take_status deadbody_closed deadbody_closed_status death_sound_enabled death_time debug_planner detach_vehicle detail_path_type direction disable_anomaly disable_hit_marks disable_info_portion disable_inv_upgrade disable_show_hide_sounds disable_talk disable_trade dont_has_info drop_item drop_item_and_teleport eat enable_anomaly enable_attachable_item enable_inv_upgrade enable_level_changer enable_memory_object enable_night_vision enable_talk enable_torch enable_trade enable_vision explode external_sound_start external_sound_stop extrapolate_length fake_death_fall_down fake_death_stand_up find_best_cover force_set_goodwill force_set_position force_stand_sleep_animation force_visibility_state fov game_vertex_id general_goodwill get_actor_jump_speed get_actor_max_walk_weight get_actor_max_weight get_actor_relation_flags get_actor_run_coef get_actor_runback_coef get_actor_sprint_koef get_additional_max_walk_weight get_additional_max_weight get_ammo_count_for_type get_ammo_in_magazine get_ammo_total get_ammo_type get_anomaly_power get_artefact get_artefact_bleeding get_artefact_health get_artefact_power get_artefact_radiation get_artefact_satiety get_attached_vehicle get_bone_id get_campfire get_car get_corpse get_current_direction get_current_holder get_current_outfit get_current_outfit_protection get_current_point_index get_dest_smart_cover get_dest_smart_cover_name get_enemy get_enemy_strength get_force_anti_aim get_hanging_lamp get_helicopter get_holder_class get_info_time get_luminocity get_luminocity_hemi get_main_weapon_type get_max_uses get_monster_hit_info get_movement_speed get_physics_object get_physics_shell get_remaining_uses get_restrictor_type get_script get_script_name get_smart_cover_description get_sound_info get_spatial_type get_start_dialog get_state get_task get_task_state get_total_weight get_visibility_state get_visual_name get_weapon_substate get_weapon_type give_game_news give_info_portion give_money give_talk_message give_talk_message2 give_task goodwill group group_throw_time_interval has_ammo_type has_info has_upgrade has_upgrade_group has_upgrade_group_by_upgrade_id head_orientation hide_weapon hit id idle_max_time idle_min_time ignore_monster_threshold in_current_loophole_fov in_current_loophole_range in_loophole_fov in_loophole_range in_restrictions in_smart_cover inactualize_game_path inactualize_level_path inactualize_patrol_path info_add info_clear inside install_upgrade inv_box_can_take inv_box_can_take_status inv_box_closed inv_box_closed_status inventory_for_each invulnerable is_active_task is_body_turning is_door_blocked_by_npc is_door_locked_for_npc is_inv_box_empty is_inv_upgrade_enabled is_level_changer_enabled is_on_belt is_talk_enabled is_talking is_there_items_to_pickup is_trade_enabled is_weapon_going_to_be_strapped item_in_slot item_on_belt iterate_installed_upgrades iterate_inventory iterate_inventory_box jump kill level_vertex_id location_on_path lock_door_for_npc lookout_max_time lookout_min_time make_item_active make_object_visible_somewhen mark_item_dropped marked_dropped mass max_health max_ignore_monster_distance memory_hit_objects memory_position memory_sound_objects memory_time memory_visible_objects mental_state money motivation_action_manager movement_enabled movement_target_reached movement_type name night_vision_enabled not_yet_visible_objects object object_count on_door_is_closed on_door_is_open out_restrictions parent path_completed path_type patrol patrol_path_make_inactual phantom_set_enemy play_cycle play_hud_motion play_sound poltergeist_get_actor_ignore poltergeist_set_actor_ignore position profile_name range rank register_door_for_npc register_in_combat relation release_stand_sleep_animation remove_all_restrictions remove_home remove_restrictions remove_sound reset_action_queue restore_default_start_dialog restore_ignore_monster_threshold restore_max_ignore_monster_distance restore_sound_threshold restore_weapon run_talk_dialog safe_cover script section see sell_condition set__force set_active_task set_actor_direction set_actor_jump_speed set_actor_max_walk_weight set_actor_max_weight set_actor_position set_actor_relation_flags set_actor_run_coef set_actor_runback_coef set_actor_sprint_koef set_additional_max_walk_weight set_additional_max_weight set_alien_control set_ammo_elapsed set_ammo_type set_anomaly_power set_artefact_bleeding set_artefact_health set_artefact_power set_artefact_radiation set_artefact_satiety set_body_state set_bone_visible set_callback set_capture_anim set_character_community set_character_icon set_character_rank set_collision_off set_community_goodwill set_condition set_const_force set_custom_panic_threshold set_default_panic_threshold set_desired_direction set_desired_position set_dest_game_vertex_id set_dest_level_vertex_id set_dest_loophole set_dest_smart_cover set_detail_path_type set_enemy set_enemy_callback set_fastcall set_force_anti_aim set_fov set_goodwill set_health_ex set_home set_invisible set_item set_level_changer_invitation set_main_weapon_type set_manual_invisibility set_mental_state set_movement_selection_type set_movement_type set_nonscript_usable set_npc_position set_override_animation set_path_type set_patrol_extrapolate_callback set_patrol_path set_previous_point set_queue_size set_range set_relation set_remaining_uses set_restrictor_type set_sight set_smart_cover_target set_smart_cover_target_default set_smart_cover_target_fire set_smart_cover_target_fire_no_lookout set_smart_cover_target_idle set_smart_cover_target_lookout set_smart_cover_target_selector set_sound_mask set_sound_threshold set_spatial_type set_start_dialog set_start_point set_sympathy set_task_state set_tip_text set_tip_text_default set_trader_global_anim set_trader_head_anim set_trader_sound set_vis_state set_visual_memory_enabled set_visual_name set_weapon_type set_weight show_condition sight_params skip_transfer_enemy sniper_fire_mode sniper_update_rate sound_prefix sound_voice_prefix spawn_ini special_danger_move squad start_particles start_trade start_upgrade stop_particles stop_talk story_id suitable_smart_cover switch_state switch_to_talk switch_to_trade switch_to_upgrade sympathy take_items_enabled target_body_state target_mental_state target_movement_type team torch_enabled transfer_item transfer_money unload_magazine unlock_door_for_npc unregister_door_for_npc unregister_in_combat use use_smart_covers_only vertex_in_direction visibility_threshold vision_enabled weapon_addon_attach weapon_addon_detach weapon_grenadelauncher_status weapon_is_grenadelauncher weapon_is_scope weapon_is_silencer weapon_scope_status weapon_silencer_status weapon_strapped weapon_unstrapped weight who_hit_name who_hit_section_name wounded

Constructors

Properties

action_type_count: 6
alifeMovementTypeMask: 0
alifeMovementTypeRandom: 1
animation: 2
bleeding: number

Intensity of actor bleeding. 0 - no bleeding.

dialog_pda_msg: 0
dummy: -1
enemy: 2
friend: 0
game_path: 0
health: number

Object health value From 0 to 1.

info_pda_msg: 1
level_path: 1
morale: number
movement: 0
neutral: 1
no_path: 3
no_pda_msg: 2
object: 5
particle: 4
patrol_path: 2
power: number
psy_health: number
radiation: number
relation_attack: 1
relation_fight_help_human: 2
relation_fight_help_monster: 4
relation_kill: 0
satiety: number
sound: 3
watch: 1

Methods

  • Parameters

    • animation: string
    • hand_usage: boolean
    • use_movement_controller: boolean

    Returns void

  • Parameters

    • animation: string
    • hand_usage: boolean
    • position: vector
    • rotation: vector
    • local_animation: boolean

    Returns void

  • Parameters

    • value1: string
    • value2: number
    • type: number
    • value3: number
    • value4: number
    • value5: number
    • value6: string

    Returns number

  • Parameters

    • value1: string
    • value2: number
    • type: unknown
    • value3: number
    • value4: number
    • value5: number

    Returns number

  • Parameters

    • value1: string
    • value2: number
    • type: unknown
    • value3: number
    • value4: number
    • value5: number
    • value6: string

    Returns number

  • Parameters

    • upgrade_section: string

      section of upgrade to add

    Returns boolean

    whether upgrade is installed successfully or not

  • Parameters

    • upgrade_section: string

      section of upgrade to check

    Returns boolean

    whether upgrade can be installed

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

    Parameters

    • entity_action: entity_action

      action to perform

    • is_high_priority: boolean

      whether it is high priority action

    Returns void

  • 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.

    Parameters

    • planner: action_planner

      action planner to show in stalker stats when debugging is enabled

    Returns void

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

    Parameters

    • is_enabled: boolean

      whether item should be enabled for usage by owning object

    Returns void

  • Switch client level changed enabled state.

    Parameters

    • is_enabled: boolean

      whether level changer should be enabled

    Returns void

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

    Parameters

    Returns number

    goodwill level from object to target

  • Display in-game UI notification.

    Parameters

    • title: string

      notification title

    • text: string

      notification text

    • icon_texture: string

      notification icon texture

    • delay: number

      delay before show notification

    • show_time: number

      time to show notification before hiding it

    • Optional type: number

      type of the notification (eNews = 0, eTalk = 1)

    Returns void

  • Show talk dialog message with icon.

    Parameters

    • title: string

      title of the message

    • text: string

      text of the message

    • icon_texture_name: string

      icon to display in message image

    • selector: string

      path in form XML to message template

    Returns void

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

    Parameters

    • task: CGameTask
    • time_to_complete: number
    • check_existing: boolean
    • timer_ttl: number

    Returns void

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

    Parameters

    Returns number

    goodwill level to target object

  • Parameters

    • upgrade_group_section: string

      section of upgrade group to check

    Returns boolean

    whether upgrade group is installed

  • Parameters

    • upgrade_section: string

      section of upgrade to check parent group

    Returns boolean

    whether upgrade parent group is installed

  • Parameters

    • upgrade_section: string

      section of upgrade to install

    Returns boolean

    whether upgrade is installed successfully or not

  • Iterate over all item upgrades.

    Parameters

    • callback: ((upgrade_section, object) => void)

      callback to call on each iteration to check installed upgrades

        • (upgrade_section, object): void
        • Parameters

          Returns void

    Returns void

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

    Parameters

    • cb: ((this, owner, item) => boolean | void)

      callback to run for each item

        • (this, owner, item): boolean | void
        • Parameters

          Returns boolean | void

    • object: game_object

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

    Returns void

  • Parameters

    • value1: number
    • Optional value2: number
    • Optional value3: number
    • Optional value4: number
    • Optional value5: number
    • Optional value6: number

    Returns void

  • Parameters

    • name: string
    • min_radius: number
    • Optional max_radius: number
    • Optional is_agressive: boolean
    • Optional mid_radius: number

    Returns void

  • Parameters

    • lvid: number
    • min_radius: number
    • Optional max_radius: number
    • Optional is_agressive: boolean
    • Optional mid_radius: number

    Returns void

  • Set level changer invitation hint text.

    Parameters

    • hint: string

      text to show when trying to change level

    Returns void

  • Parameters

    • value1: string
    • EPatrolStartType: number
    • EPatrolRouteType: number
    • value2: boolean

    Returns void

  • 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.

    Parameters

    • text: string

      text to set as tip

    Returns void

Generated using TypeDoc