Here's what they had....Apparently, it worked fine, but I just can't get it to do anything.
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.")
--FinishLevel()
else
--Panel(20,5,80,10)
TextCenterOnXColor(50,10,1,("Enemies left: " .. count .. ""),255,255,255)
end
end