@cybernescence
I probably am doing something wrong, but I'm going to go over this as step-by-step as possible. It's really annoying when talented people offer solutions for things and some unknown variable decides it's not going to let it work.
I replaced loading.lua with this, keeping the old loading.lua as loading_old.lua. they both are present in the built game files
---------------------------------
-- backdrop
--g_imgBackdrop = LoadImage("titlesbank\\" .. g_strStyleFolder .. "\\" .. g_strBestResolution .. "\\loading.png")
local file = io.open("savegames\\nextlevel.dat", "r")
if file ~= nil then
strNewLevelFilename = file:read()
io.close(file)
local file2 = io.open("titlesbank\\" .. g_strStyleFolder .. "\\" .. g_strBestResolution .. "\\_e_loading" .. strNewLevelFilename .. ".png","r")
local file3 = io.open("titlesbank\\" .. g_strStyleFolder .. "\\" .. g_strBestResolution .. "\\loading" .. strNewLevelFilename .. ".png","r")
if strNewLevelFilename == "" or strNewLevelFilename == nil or (file2 == nil and file3 == nil) then
g_imgBackdrop = LoadImage("titlesbank\\" .. g_strStyleFolder .. "\\" .. g_strBestResolution .. "\\loading.png")
else
g_imgBackdrop = LoadImage("titlesbank\\" .. g_strStyleFolder .. "\\" .. g_strBestResolution .. "\\loading" .. strNewLevelFilename .. ".png")
os.remove ("savegames\\nextlevel.dat")
end
if file2 ~= nil then io.close(file2) end
if file3 ~= nil then io.close(file3) end
else
g_imgBackdrop = LoadImage("titlesbank\\" .. g_strStyleFolder .. "\\" .. g_strBestResolution .. "\\loading.png")
end
---------------------------------
and I used your winzone script, HOWEVER, I added one command: removeplayerweapons(e). the script is saved as winzone2.lua
-- LUA Script - precede every function and global member with lowercase name of script
-- Place next level in the 'NAME' field of the zone
function winzone2_init_name(e,name)
weapon_name[e] = name
end
function winzone2_main(e)
if g_Entity[e]['plrinzone']==1 then
file = io.open("savegames\\nextlevel.dat", "w")
io.output(file)
io.write(weapon_name[e])
io.close(file)
RemovePlayerWeapons(e)
JumpToLevel(weapon_name[e])
end
end
in TEST GAME when i walk into the winzone, it tells me it's going to load the second level.
I built the game, and nothing from level 2 is included. the winzone works, but it uses the same loading screen and loads level 1 again.
can you please help me out here? this is the one thing preventing me from releasing my game at this point.
Hire Me! I model, animate, cook, clean, and texture!