Divergent/mods/Redone Collection/gamedata/scripts/redone_endless_mil_night_mu...

31 lines
870 B
Plaintext
Raw Permalink Normal View History

function actor_on_first_update()
local pool = {
["mil_endless_night_spawn_01"] = {
pos = vector():set(238.30529785156, 1.3474156856537, 437.15505981445),
smart = "mil_smart_terrain_2_1",
},
["mil_endless_night_spawn_02"] = {
pos = vector():set(38.137920379639, -13.218147277832, 333.01922607422),
smart = "mil_smart_terrain_2_6",
},
["mil_endless_night_spawn_03"] = {
pos = vector():set(-364.98373413086, -15.18780040741, 203.99565124512),
smart = "mil_smart_terrain_4_2",
}
}
for sec,v in pairs(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
end
end
function on_game_start()
RegisterScriptCallback("actor_on_first_update",actor_on_first_update)
end