Last active
July 24, 2020 20:14
-
-
Save ChugunovRoman/c204724cc31bb20633be66448a997736 to your computer and use it in GitHub Desktop.
STALKER CoC. Логика НПС-охотников за ГГ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[logic] | |
active = beh@general | |
on_hit = hit | |
on_death = death | |
combat_ignore = combat_ignore | |
post_combat_time = 0,0 | |
[beh@general] | |
combat_ignore = combat_ignore | |
combat_ignore_cond = {is_enemy_actor()} false, {-alert} always, false | |
combat_ignore_keep_when_attacked = false | |
; combat_ignore_cond = {=fighting_dist_ge(10) !is_enemy_actor()} always, false | |
meet = meet | |
gather_items_enabled = false | |
corpse_detection_enabled = false | |
actor_dialogs = actor_dialogs | |
behavior_state = beh_move | |
target = {!is_squad_commander} commander, actor_squad | |
walk_dist = 4 | |
jog_dist = 8 | |
run_dist = {=surge_started} 40, 90 | |
keep_distance = near | |
near_desired_dist = {!is_squad_commander} 3, 3 | |
far_desired_dist = {!is_squad_commander} 8, 10 | |
wait_anim = {=is_wounded} nil, {is_squad_commander} rush, sprint | |
walk_anim = {=is_wounded} nil, {is_squad_commander} rush, sprint | |
jog_anim = {=is_wounded} nil, {is_squad_commander} rush, sprint | |
run_anim = {=is_wounded} nil, {is_squad_commander} rush, sprint | |
sprint_anim = {=is_wounded} nil, {is_squad_commander} rush, sprint | |
delay_anim = {=is_wounded} nil, {+npcx_beh_substate_stealth} hide, random_animation | |
[hit] | |
on_info = %+alert% | |
[death] | |
on_info = %+alert% | |
[combat_ignore] | |
[meet] | |
;reset_distance = 2 | |
abuse = false | |
snd_on_use = nil | |
close_distance = {=is_wounded} 1, {!is_squad_commander} 0, 2 | |
close_anim = {=is_wounded} nil, {!is_squad_commander} nil, {+npcx_beh_substate_stealth -npcx_beh_substate_relax} hide_no_wpn, guard_na | |
close_snd_hello = nil | |
close_snd_bye = nil | |
close_victim = {=is_wounded} nil, {!is_squad_commander} nil, actor | |
far_distance = 0 | |
far_anim = nil | |
far_snd = nil | |
far_victim = nil | |
use = {=is_wounded} true, false | |
allow_break = true | |
use_text = nil | |
trade_enable = {=is_wounded} false, true | |
meet_dialog = {=is_wounded} axr_companion_medkit, nil | |
[actor_dialogs] | |
disable = dm_ordered_task_dialog, dm_traveler_dialog, dm_actor_become_guide_to_companion_dialog, dm_universal_dialog, about_quests_dialog_dolg, about_quests_dialog_freedom, about_quests_dialog_bandit, about_quests_dialog_stalkers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup_hunter_logic(npc, st, loaded) | |
npc:give_info_portion("npcx_is_hunter") | |
local ltx_name = "scripts\\beh_hunter.ltx" | |
local ltx = ini_file(ltx_name) | |
if not (ltx) then | |
log("ERROR: do not have access to scripts\\beh_hunter.ltx! Make sure you installed properly!") | |
return | |
end | |
local id = npc:id() | |
local se_npc = alife_object(id) | |
local unreg_id = se_npc and se_npc.m_smart_terrain_id | |
if (unreg_id and unreg_id ~= 65535) then | |
local unreg = alife_object(unreg_id) | |
if (unreg) then | |
unreg:unregister_npc(se_npc) | |
end | |
end | |
xr_logic.configure_schemes( | |
npc, | |
ltx, | |
ltx_name, | |
modules.stype_stalker, | |
loaded and st.loaded_section_logic or "logic", | |
"" | |
) | |
local section = | |
loaded and st.loaded_active_section or xr_logic.determine_section_to_activate(npc, ltx, "logic", db.actor) | |
xr_logic.activate_by_section(npc, ltx, section, "", loaded) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment