Page 1 of 1

Timer

PostPosted: Fri Aug 29, 2008 8:22 pm
by LucasA33
I want to make a timer, So That It starts at 5min and text counts down to zero, then My actor Gets destroyed.

Re: Timer

PostPosted: Fri Aug 29, 2008 8:49 pm
by BlarghNRawr
start the text actor at 500, then create a timer for one second, set repeat to forever.
when the timer finishes, make the text -1.
then actor destroyed when text = 0! :D

Re: Timer

PostPosted: Fri Aug 29, 2008 8:53 pm
by LucasA33
I got Partaily right, Tell me, Where I put the One Second Thang

Re: Timer

PostPosted: Fri Aug 29, 2008 8:59 pm
by BlarghNRawr
im not sure but i think its...
(text actor) Create actor -> ...ummmm
if(textactor = 0)
destroyactor... ur actor...
sumthing like that, u may need to ask sumone better at coding
try mine though

Re: Timer

PostPosted: Sat Aug 30, 2008 12:03 am
by Rux
Ok first its a WHOLE lot easier just to use a var.
First make a var don't change anything. We'll just call that timeV.
Now on the timer actors create actor,
Code: Select all
timeV = 500;

This will set the timer to 500 or you could set it to any time you want.

Now on draw actor of the timer,
Code: Select all
textNumber = timeV;

This will make you timer set its self to the var every frame.

Then create your timer set it to 1000 ms.

Then on the timer event,
Code: Select all
timeV = timeV - 1;
if(timeV == 0)
{
   DestroyTimer("YourTimer");
   DestroyActor("YourActor");
}


Good Luck! :D

Re: Timer

PostPosted: Sat Aug 30, 2008 4:04 pm
by BlarghNRawr
...awww

Re: Timer

PostPosted: Wed Sep 03, 2008 6:55 am
by Spidy
Rux wrote:Ok first its a WHOLE lot easier just to use a var.
First make a var don't change anything. We'll just call that timeV.
Now on the timer actors create actor,
Code: Select all
timeV = 500;

This will set the timer to 500 or you could set it to any time you want.

Now on draw actor of the timer,
Code: Select all
textNumber = timeV;

This will make you timer set its self to the var every frame.

Then create your timer set it to 1000 ms.

Then on the timer event,
Code: Select all
timeV = timeV - 1;
if(timeV == 0)
{
   DestroyTimer("YourTimer");
   DestroyActor("YourActor");
}


Good Luck! :D


hmmm........ :)