Page 1 of 1

timer w/min. and seconds.

PostPosted: Sat Jun 09, 2007 2:16 pm
by J Slayer67
hey does anybody know how to make a timer with minutes and seconds because im trying to make one with a timer but it is going wacko :shock: the timer is supposed to move the second textnum. but it is moveing the minute textnum TOO fast if it helps i'm using 2 text numbers. heres my code:
Code: Select all
if (second.textNumber=second.textNumber=60)
{
    minut.textNumber=minut.textNumber+1;
    second.textNumber=second.textNumber=00;
}
this is in draw actor of minute and my timer + 1 to the second textnum. but the stupid second textnum. doesn't move at all. :evil:
...any ideas?

PostPosted: Sat Jun 09, 2007 2:21 pm
by J Slayer67
here's a print screen of what happens

PostPosted: Sat Jun 09, 2007 2:23 pm
by Oman
how long is ur timer supposed to be, 1 second?

PostPosted: Sat Jun 09, 2007 2:46 pm
by J Slayer67
yeah i have it for 1000 and i tried 10000 neither worked the same thing happened for both. i'm tying to make a timer like your cliffclimb game oman :wink:

PostPosted: Sat Jun 09, 2007 3:53 pm
by Rux
Try this. Unfortanetly I don't know how to make a timer counting down, but try it anyway.

1.Make a second textNumber, a :, and a Minute textNumber, Make sure they're seperate.

2.Second,Create Actor, Create Timer, 1000 ms.

3.Second,Timer, (Your Timer's Name),Script Editor.

Code: Select all
Second.textNumber = Second.textNumber + 1;
if(Second.textNumber > 59)
{
     Minute.textNumber = Minute.textNumber + 1;
     Second.textNumber = 0;
}
//The next part is optional\\
if(Minute.textNumber > 3)
{
    PlaySound("Beep")
    DestroyActor("Second");
    DestroyActor(":")
    DestroyActor("Minute");
}


What this does is when the second = 59 Minute + 1 Second = 0.
After 3 minutes The timer gets destroyed and a beeping sound Occors. :)

I will make a quick demo if you don't understand.

PostPosted: Sat Jun 09, 2007 4:25 pm
by Rux
Here you go.
It lasts for 3 minutes.

PostPosted: Sun Jun 10, 2007 5:22 pm
by J Slayer67
thx rux it worked great now i can have lvls that you haveto stay alive in a confind area :D