Page 1 of 1

Destroy actor on timer

PostPosted: Fri Jul 24, 2009 12:00 pm
by paperboy321
I need an actor to get destroyed after the timer is up (6000 ms)
I tried doing this: Add<Timer(destroy_it)<Destroy Actor(event actor).
And the timer's settings are: Periodic, 6000 ms, 1 times.
And basically the actor I want to destroy ends the game, so I only want it to go off once.

It looks ok to me, what am I doing wrong?

Re: Destroy actor on timer

PostPosted: Sun Jul 26, 2009 7:47 pm
by sirmashni1
hi, i'm not very good in english i did 2 exemple. :D

Re: Destroy actor on timer

PostPosted: Sun Jul 26, 2009 7:49 pm
by sirmashni1
lol i cant add the file...

Re: Destroy actor on timer

PostPosted: Sun Jul 26, 2009 8:02 pm
by sirmashni1
well to destroy the actor when timer is finish:

(on actor)add->draw actor->script editor->

if(transp=0)
{
CreateTimer("Event Actor", "timer1", 6000);
}

(on actor)add->timer->timer1(periodic, 6000 ms, 1 times)->add action->script editor->

transp=1;