olaf1
Senior Resident
On forum: 01/17/2012
Messages: 240
|
i hope that anyone can help me away.
i have writ this
local ltx = ini_file("respawn\\respwaner.ltx")
function spwanen()
if db.actor:alive() == false then return end
local level_name = level.name()
if ltx then
if ltx:section_exist("respawns") then
local respwan_haupt = read_section(ltx, "respawns")
for respwans,bool in pairs(respwan_haupt) do
if bool == true then
if ltx:section_exist(respwans) then
local level = ltx:r_bool(respwans,"level")
if level_name == level then
local sections = ltx:r_bool(respwans,"sections")
local position = ltx:r_bool(respwans,"position")
local pos = vector():set(position)
local lvi = db.actor:level_vertex_id()
local gvi = db.actor:game_vertex_id()
local se_obj = alife():create(section, pos, lvi, gvi)
datei = io.open("respawn\\respwaner.ltx", "w")
end
end
end
end
end
end
end
and this is the ltx datei
[respawns]
mar_clear_sky_respawn_1 = true
mar_clear_sky_respawn_2 = true
mar_clear_sky_respawn_3 = true
[mar_clear_sky_respawn_1]
level = marsh
sections = mar_clear_sky_respawn_1
position = -61.996055603027,0.92057931423187,293.67742919922
[mar_clear_sky_respawn_2]
level = marsh
sections = mar_clear_sky_respawn_2
position = 61.996055603027,0.92057931423187,293.67742919922
[mar_clear_sky_respawn_3]
level = marsh
sections = mar_clear_sky_respawn_3
position = -61.996055603027,0.92057931423187,293.67742919922
i will write in the "respawns" the bool of false.
how i can make this
than you
i know write i can with
write = datei:write()
but how i can writ in this ltx and in the correct section of this ltx?
thank you |