@smallg that is actually almost perfect! Thank you! That gives me something to start with. The main issue I have with it is that the further away from the start area you get, the prompt leaves the screen (Though the time is still running). I am working on it to get the script to keep the prompt up all the time. Here is the script with the few minor changes from your original:
Quote: "--change to entity number of winzone
local zonenumber = 155
--change to time limit before gameover
local delay = 1200
local time1 = 0
local time2 = g_Time
local timepassed = time2 - time1
function countdown_init()
end
function countdown_main()
if g_Entity[zonenumber] ~= nil then
if g_Entity[zonenumber]['plrinzone'] == 0 then
if time1 == 0 then
time1 = g_Time
end
time2 = g_Time
timepassed = (time2 - time1) / 1000
if timepassed >= delay - 0.5 then
SetPlayerLives(e,0)
HurtPlayer(e,g_PlayerHealth)
else
Prompt("Time until fail: " .. math.floor(delay - timepassed) .. "s")
end
end
end
end"
I thought the issue may be here:
if g_Entity[zonenumber]['plrinzone'] == 0 then
But I tried to comment it out and had the same result. Time to dig into the code bank