Пропишем нужному нам смарт-терейну укрытие
"gamedata\configs\misc\simulation_objects_props.ltx"
Code
[esc_sim_13]:default
surge = 1 ; прописали возможность укрытия
territory = 1
sim_avail = true
Регистрируем наше укрытие
"gamedata\configs\misc\surge_manager.ltx"
Code
;escape
esc_surge_hide_sim_13
Зарегистрируем нашу локацию в скриптах
"gamedata\scripts\sim_board.script"
Code
--'******************************************************
--'* Реестр смарт-террейнов. Игровое поле симуляции.
--'******************************************************
--' В этом ltx хранятся дескрипторы сквадов.
squad_ltx = system_ini()
setting_ini = ini_file("misc\\simulation.ltx")
local group_id_by_levels = {zaton = 1,
pripyat = 2,
jupiter = 3,
labx8 = 4,
jupiter_underground = 5,
escape = 6}
"gamedata\scripts\smart_terrain.script"
Code
строка 1196
function surge_stats()
local sim_obj_registry = simulation_objects.get_sim_obj_registry().objects
local sim_squads = {
["zaton"] = {},
["jupiter"] = {},
["pripyat"] = {},
["escape"] = {}
}
local sim_smarts = {
["zaton"] = {},
["jupiter"] = {},
["pripyat"] = {},
["escape"] = {}
}
строка 1241
print_smarts_and_squads_by_level("zaton")
print_smarts_and_squads_by_level("jupiter")
print_smarts_and_squads_by_level("pripyat")
p rint_smarts_and_squads_by_level("escape")
------------------------------------------------------------
"gamedata\scripts\surge_manager.script"
Code
строка 38
self.levels_respawn = {zaton = false, jupiter = false, pripyat = false, escape = false}
строка 194
xr_sound.set_sound_play(db.actor:id(), "zat_a2_stalker_barmen_after_surge")
elseif(level.name()=="jupiter") then
xr_sound.set_sound_play(db.actor:id(), "jup_a6_stalker_medik_after_surge")
elseif not has_alife_info("pri_b305_fifth_cam_end") then
xr_sound.set_sound_play(db.actor:id(), "pri_a17_kovalsky_after_surge")
elseif(level.name()=="escape") then
xr_sound.set_sound_play(db.actor:id(), "zat_a2_stalker_barmen_after_surge")
строка 249
if(level.name()=="zaton") then
xr_sound.set_sound_play(db.actor:id(), "zat_a2_stalker_barmen_surge_phase_2")
elseif(level.name()=="jupiter") then
xr_sound.set_sound_play(db.actor:id(), "jup_a6_stalker_medik_phase_2")
elseif not has_alife_info("pri_b305_fifth_cam_end") then
xr_sound.set_sound_play(db.actor:id(), "pri_a17_kovalsky_surge_phase_2")
elseif(level.name()=="escape") then
xr_sound.set_sound_play(db.actor:id(), "zat_a2_stalker_barmen_surge_phase_2")
строка 273
if(level.name()=="zaton") then
xr_sound.set_sound_play(db.actor:id(), "zat_a2_stalker_barmen_surge_phase_1")
elseif(level.name()=="jupiter") then
xr_sound.set_sound_play(db.actor:id(), "jup_a6_stalker_medik_phase_1")
elseif not has_alife_info("pri_b305_fifth_cam_end") then
xr_sound.set_sound_play(db.actor:id(), "pri_a17_kovalsky_surge_phase_1")
elseif(level.name()=="escape") then
xr_sound.set_sound_play(db.actor:id(), "zat_a2_stalker_barmen_surge_phase_1")
строка 329
self.levels_respawn = {zaton = true, jupiter = true, pripyat = true, escape = true}
строка 352
self.levels_respawn = {zaton = true, jupiter = true, pripyat = true, escape = true}
строка 638
packet:w_bool(self.levels_respawn.zaton)
packet:w_bool(self.levels_respawn.jupiter)
packet:w_bool(self.levels_respawn.pripyat)
packe t:w_bool(self.levels_respawn.escape)
строка 665
self.levels_respawn.zaton = packet:r_bool()
self.levels_respawn.jupiter = packet:r_bool()
self.levels_respawn.pripyat = packet:r_bool()
self.levels_respawn.escape = packet:r_bool()
переходим к олл.спавн - создаем секцию укрытия
"alife_escape.ltx"
Code
[xxxx]
; cse_abstract properties
section_name = space_restrictor
name = esc_surge_hide_sim_13
position = -11.2279901504517,2.46390247344971,57.3380393981934
direction = 0,0,0
version = 0x7c
script_version = 8
; cse_alife_object properties
game_vertex_id = 934
distance = 0
level_vertex_id = 3366
object_flags = 0xffffff3e
; cse_shape properties
shapes = shape0
shape0:type = box
shape0:axis_x = 3.27519989013672,0,0
shape0:axis_y = 0,5.44060039520264,0
shape0:axis_z = 0,0,7.41159915924072
shape0:offset = 0,0,0
; cse_alife_space_restrictor properties
restrictor_type = 0
Создаем точки пути по колличеству мест в укрытии
"way_escape.ltx"
Code
[esc_sim_13_surge_1_look]
points = p0
p0:name = name00
p0:position = -11.0934257507324,2.45600557327271,56.0012626647949
p0:game_vertex_id = 1051
p0:level_vertex_id = 286804
[esc_sim_13_surge_1_walk]
points = p0
p0:name = name00
p0:position = -12.587254524231,2.45982217788696,54.6062545776367
p0:game_vertex_id = 1051
p0:level_vertex_id = 284937
[esc_sim_13_surge_2_look]
points = p0
p0:name = name00
p0:position = -11.7026491165161,2.45731353759766,55.4043731689453
p0:game_vertex_id = 1051
p0:level_vertex_id = 285862
[esc_sim_13_surge_2_walk]
points = p0
p0:name = name00
p0:position = -11.7085494995117,2.45401954650879,54.6906051635742
p0:game_vertex_id = 1051
p0:level_vertex_id = 285861
[esc_sim_13_surge_3_look]
points = p0
p0:name = name00
p0:position = -11.700403213501,2.46191310882568,55.9261016845703
p0:game_vertex_id = 1051
p0:level_vertex_id = 285863
[esc_sim_13_surge_3_walk]
points = p0
p0:name = name00
p0:position = -10.5211238861084,2.45401906967163,54.5706977844238
p0:game_vertex_id = 1051
p0:level_vertex_id = 287736
[esc_sim_13_surge_4_look]
points = p0
p0:name = name00
p0:position = -12.1378507614136,2.46710777282715,55.9775772094727
p0:game_vertex_id = 1051
p0:level_vertex_id = 285863
[esc_sim_13_surge_4_walk]
points = p0
p0:name = name00
p0:position = -12.5659475326538,2.4704270362854,55.9364585876465
p0:game_vertex_id = 1051
p0:level_vertex_id = 284939
[esc_sim_13_surge_5_look]
points = p0
p0:name = name00
p0:position = -11.3268537521362,2.45915699005127,56.0716171264648
p0:game_vertex_id = 1051
p0:level_vertex_id = 286804
[esc_sim_13_surge_5_walk]
points = p0
p0:name = name00
p0:position = -11.4233283996582,2.45504951477051,55.4901466369629
p0:game_vertex_id = 1051
p0:level_vertex_id = 286803
[esc_sim_13_surge_6_look]
points = p0
p0:name = name00
p0:position = -11.951548576355,2.46743059158325,56.5034790039063
p0:game_vertex_id = 1051
p0:level_vertex_id = 285864
[esc_sim_13_surge_6_walk]
points = p0
p0:name = name00
p0:position = -10.5399560928345,2.45401906967163,55.9832763671875
p0:game_vertex_id = 1051
p0:level_vertex_id = 287738
[esc_sim_13_surge_7_look]
points = p0
p0:name = name00
p0:position = -11.060601234436,2.46146583557129,56.6575355529785
p0:game_vertex_id = 1051
p0:level_vertex_id = 286805
[esc_sim_13_surge_7_walk]
points = p0
p0:name = name00
p0:position = -12.5727767944336,2.47284889221191,57.334114074707
p0:game_vertex_id = 1051
p0:level_vertex_id = 284941
[esc_sim_13_surge_8_look]
points = p0
p0:name = name00
p0:position = -11.7709636688232,2.46654939651489,57.2202682495117
p0:game_vertex_id = 1051
p0:level_vertex_id = 285865
[esc_sim_13_surge_8_walk]
points = p0
p0:name = name00
p0:position = -11.6660528182983,2.4660382270813,56.7951736450195
p0:game_vertex_id = 1051
p0:level_vertex_id = 285864
[esc_sim_13_surge_9_look]
points = p0
p0:name = name00
p0:position = -11.4014568328857,2.4647479057312,57.3022918701172
p0:game_vertex_id = 1051
p0:level_vertex_id = 286806
[esc_sim_13_surge_9_walk]
points = p0
p0:name = name00
p0:position = -10.5875377655029,2.46077871322632,57.3240737915039
p0:game_vertex_id = 1051
p0:level_vertex_id = 287740
[esc_sim_13_surge_10_look]
points = p0
p0:name = name00
p0:position = -12.009449005127,2.47024631500244,58.7685432434082
p0:game_vertex_id = 1051
p0:level_vertex_id = 285867
[esc_sim_13_surge_10_walk]
points = p0
p0:name = name00
p0:position = -12.5359506607056,2.47053003311157,58.6904754638672
p0:game_vertex_id = 1051
p0:level_vertex_id = 284943
[esc_sim_13_surge_11_look]
points = p0
p0:name = name00
p0:position = -11.6696643829346,2.47010707855225,58.7928047180176
p0:game_vertex_id = 1051
p0:level_vertex_id = 285867
[esc_sim_13_surge_11_walk]
points = p0
p0:name = name00
p0:position = -11.7617807388306,2.47143888473511,58.0255508422852
p0:game_vertex_id = 1051
p0:level_vertex_id = 285866
[esc_sim_13_surge_12_look]
points = p0
p0:name = name00
p0:position = -11.1556959152222,2.46973323822021,58.9260101318359
p0:game_vertex_id = 1051
p0:level_vertex_id = 286808
[esc_sim_13_surge_12_walk]
points = p0
p0:name = name00
p0:position = -10.5822420120239,2.46985769271851,58.7564964294434
p0:game_vertex_id = 1051
p0:level_vertex_id = 287742
Автор: Nuklia