Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Timer start and stop?
Old
billy
Guest
 
Status:
Posts: n/a
Default Timer start and stop? - 04-21-2011, 12:51 PM

hello everyone.

I have a simple racing game, you have to fly through hoops in order.

i want to get the timer i made to start at one hoop and stop at the last.

how can i make it stop once it starts.

If you want screen dumps of the programme i can do so.

any help apreciated.

Cheers

Billy
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 04-21-2011, 04:52 PM

Make a variable, lets call in #ofHoops

Then

While (#ofHoops)< (The number of hoops you have in your program)
Timer variable increment by 1
Wait one second
Timer set text to Timer Variable as string

and have another method that makes it so when someone goes through a hoop, the #ofHoops variable will increase by 1 (But make the hoop disapear/move away so the user cannot go through it twice.


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Old
billy
Guest
 
Status:
Posts: n/a
Default 04-22-2011, 04:05 AM

i used

while both hoops>=1 and hoops<=9
begin
during - play timer
end

in events

but the game crashes when you go through the final hoop making hoops=10

the timer works fine, just cant get it to stop when the final hoop is passed.

cheers.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.