Tempermental timers

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Tempermental timers

Post by wishihadaname »

I think I scriped this timer correctly but it causes a crash without any relevant error, i'm sure this is it because the crash always happens 35 seconds after the objective starts.

anyone see anything wrong with this timer?

--timed ambush
flanked= CreateTimer("flanked1")
SetTimerValue(flanked1, 35)
StartTimer(flanked1)
OnTimerElapse(
Ambush("Flanked1", 35, 6),
function(timer)
DestroyTimer(flanked)
end,
flanked1
)
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: tempermental timers

Post by 501st_commander »

Code: Select all

--timed ambush
flanked= CreateTimer("flanked1")
SetTimerValue(flanked1, 35)
StartTimer(flanked1)
    OnTimerElapse(
        Ambush("Flanked1", 35, 6),
        function(timer)
            DestroyTimer(flanked1)
        end,
    flanked1
)
maybe?
Post Reply