Page 1 of 1

Ambush on a timer

Posted: Sat Mar 20, 2010 7:01 pm
by wishihadaname
I am currently trying to tie an ambush to a timer, it seems straight forward but i'm missing something because the ambush isn't spawning. I don't think I set up the timer wrong, there are no errors that say that much, but I must be using the wrong function to callup the ambush, or do I need to referance it somerwere else too? Anyways here is my code, could someone help me out?
Hidden/Spoiler:
--Timed Ambushes
round1= CreateTimer("round1")
SetTimer(round1, 100)
StartTimer(round1)
OnTimerElapse(
function(timer)
Ambush("Ambushregion6", "Droidpath4", 35, 6)
DestroyTimer(timer)
end,
round1
)
--Timed Ambushes
round2= CreateTimer("round2")
SetTimer(round2, 200)
StartTimer(round2)
OnTimerElapse(
function(timer)
Ambush("Ambushregion6", "Droidpath4", 35, 6)
DestroyTimer(timer)
end,
round2
)

Re: Ambush on a timer

Posted: Sat Mar 20, 2010 7:54 pm
by Fiodis
Maybe you could try this?
Hidden/Spoiler:
--Timed Ambushes
round1= CreateTimer("round1")
SetTimer(round1, 100)
StartTimer(round1)
OnTimerElapse(
function(round1)
Ambush("Ambushregion6", "Droidpath4", 35, 6)
DestroyTimer(round1)
end,
round1
)
--Timed Ambushes
round2= CreateTimer("round2")
SetTimer(round2, 200)
StartTimer(round2)
OnTimerElapse(
function(round2)
Ambush("Ambushregion6", "Droidpath4", 35, 6)
DestroyTimer(round2)
end,
round2
)