Victory Timer
Posted: Sat Sep 03, 2011 11:54 am
Alright, I've read a tutorial about timers, it didn't work, so I want to make a timer that lasts 15 minutes and when it ends you get victory. It's probably really simple but not for me. 
That's what I want.Tears2Roses wrote:But if you always wanted a timer that lasts 15 minutes in your map that would be different.
Code: Select all
--Setup Timer--
victory = CreateTimer("victory")
SetTimerValue(victory, 900.0)
-- ON FIRST SPAWN --
onfirstspawn = OnCharacterSpawn(
function(character)
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
StartTimer(victory)
OnTimerElapse(
function(timer)
MissionVictory(DEF)
DestroyTimer(timer)
end,
victory
)
end
)