function actor_on_first_update() local lc_pool = { ["lc_pri01_pri02"] = { pos = vector():set(-240.457, -0.2567, 11.6087), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri02_pri01"] = { pos = vector():set(-246.8726, -1.8116, 21.0540), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri02_pri01.1"] = { pos = vector():set(-247.0531, -2.0173, 20.8227), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri02_pri01.2"] = { pos = vector():set(-247.4799, -1.1919, 21.7637), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri02_pri01.3"] = { pos = vector():set(-246.5143, -1.5847, 21.3174), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri02_pri01.4"] = { pos = vector():set(-247.3577, -1.5732, 21.3265), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri02_pri01.5"] = { pos = vector():set(-246.7463, -1.2689, 21.6755), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri03_pri04"] = { pos = vector():set(-52.1884, -0.2594, 230.8513), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri04_pri03"] = { pos = vector():set(-45.6381, -1.7064, 240.5140), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri04_pri03.1"] = { pos = vector():set(-45.8173, -1.9374, 240.2669), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri04_pri03.2"] = { pos = vector():set(-46.0537, -1.3073, 240.9701), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri04_pri03.3"] = { pos = vector():set(-44.9684, -1.5036, 240.7479), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri04_pri03.4"] = { pos = vector():set(-45.0185, -1.1524, 241.1490), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", }, ["lc_pri04_pri03.5"] = { pos = vector():set(-45.3993, -1.0871, 241.2229), smart = "pri_sim_1", spot = "level_changer_spot_mini", hint = "pri_space_restrictor_to_cop_pripyat", } } for sec,v in pairs(lc_pool) do local se = get_story_se_item(sec) if not (se) then local pos = v.pos local vid = level.vertex_id(pos) local gid = SIMBOARD.smarts_by_names[v.smart].m_game_vertex_id se = alife():create(sec,pos,vid,gid) end if (se.position:distance_to_sqr(v.pos) > 0.1) then local pos = v.pos local vid = level.vertex_id(pos) local gid = SIMBOARD.smarts_by_names[v.smart].m_game_vertex_id TeleportObject(se.id,pos,vid,gid) end if (level.map_has_object_spot(se.id,v.spot) == 0) then level.map_add_object_spot_ser(se.id,v.spot,game.translate_string(v.hint)) end end end function check_name(actor,obj,p) return p and p[1] and obj and string.find(obj:name(),p[1]) and true end function teleport_actor(actor,obj) local p = { ["lc_pri01_pri02"] = { pos = vector():set(-240.45722961426, -0.25674521923065, 11.60870552063), w_p = vector():set(-246.87268066406, -1.8116412162781, 21.054019927979), smart = "pri_sim_1", }, ["lc_pri02_pri01"] = { pos = vector():set(-246.87268066406, -1.8116412162781, 21.054019927979), w_p = vector():set(-240.45722961426, -0.25674521923065, 11.60870552063), smart = "pri_sim_1", }, ["lc_pri02_pri01.1"] = { pos = vector():set(-246.87268066406, -1.8116412162781, 21.054019927979), w_p = vector():set(-240.45722961426, -0.25674521923065, 11.60870552063), smart = "pri_sim_1", }, ["lc_pri02_pri01.2"] = { pos = vector():set(-246.87268066406, -1.8116412162781, 21.054019927979), w_p = vector():set(-240.45722961426, -0.25674521923065, 11.60870552063), smart = "pri_sim_1", }, ["lc_pri02_pri01.3"] = { pos = vector():set(-246.87268066406, -1.8116412162781, 21.054019927979), w_p = vector():set(-240.45722961426, -0.25674521923065, 11.60870552063), smart = "pri_sim_1", }, ["lc_pri02_pri01.4"] = { pos = vector():set(-246.87268066406, -1.8116412162781, 21.054019927979), w_p = vector():set(-240.45722961426, -0.25674521923065, 11.60870552063), smart = "pri_sim_1", }, ["lc_pri02_pri01.5"] = { pos = vector():set(-246.87268066406, -1.8116412162781, 21.054019927979), w_p = vector():set(-240.45722961426, -0.25674521923065, 11.60870552063), smart = "pri_sim_1", }, ["lc_pri03_pri04"] = { pos = vector():set(-52.188484191895, -0.25943338871002, 230.85137939453), w_p = vector():set(-45.638130187988, -1.7064807415009, 240.51406860352), smart = "pri_sim_1", }, ["lc_pri04_pri03"] = { pos = vector():set(-45.638130187988, -1.7064807415009, 240.51406860352), w_p = vector():set(-52.188484191895, -0.25943338871002, 230.85137939453), smart = "pri_sim_1", }, ["lc_pri04_pri03.1"] = { pos = vector():set(-45.638130187988, -1.7064807415009, 240.51406860352), w_p = vector():set(-52.188484191895, -0.25943338871002, 230.85137939453), smart = "pri_sim_1", }, ["lc_pri04_pri03.2"] = { pos = vector():set(-45.638130187988, -1.7064807415009, 240.51406860352), w_p = vector():set(-52.188484191895, -0.25943338871002, 230.85137939453), smart = "pri_sim_1", }, ["lc_pri04_pri03.3"] = { pos = vector():set(-45.638130187988, -1.7064807415009, 240.51406860352), w_p = vector():set(-52.188484191895, -0.25943338871002, 230.85137939453), smart = "pri_sim_1", }, ["lc_pri04_pri03.4"] = { pos = vector():set(-45.638130187988, -1.7064807415009, 240.51406860352), w_p = vector():set(-52.188484191895, -0.25943338871002, 230.85137939453), smart = "pri_sim_1", }, ["lc_pri04_pri03.5"] = { pos = vector():set(-45.638130187988, -1.7064807415009, 240.51406860352), w_p = vector():set(-52.188484191895, -0.25943338871002, 230.85137939453), smart = "pri_sim_1", }, } local sec = obj and obj:section() local v = sec and p[sec] if (v and v.w_p and v.pos and v.smart) then db.actor:set_actor_position(v.w_p) end end function on_game_start() RegisterScriptCallback("actor_on_first_update",actor_on_first_update) end