Hi! i have this script for kill all enemies.. but i want to jump to ''LEVEL4.FPM'' but it doesnt, i have this script attached to a triggerzone and in ifused = level4.fpm but it doesnt work.. how can i do this?
i want to when the player kills all enemies, jump to the level4.fpm (next level)
thank you all!
function win2_init(e)
end
function win2_main(e)
local End_Game = true
local count = 0
for k, _ in pairs(ai_soldier_state) do
local Soldier = g_Entity[k]
if Soldier ~= nil and Soldier.health > 0 then
End_Game = false
count = count + 1
end
end
if End_Game then
Prompt("All enemies have been eliminated, level has been completed.")
JumpToLevelIfUsed(e)
else
--Panel(20,5,80,10)
TextCenterOnXColor(8,8,1,("Skeletons: " .. count .. ""),255,255,255)
end
end