Alice Community  

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

Thread Tools Display Modes
help me please!!! how to set a timer on a game
Junior Member
Status: Offline
Posts: 1
Join Date: Nov 2011
Smile help me please!!! how to set a timer on a game - 11-13-2011, 04:15 AM

i am creating a time trial game for a project and am having problems setting the timing aspect up - at present i have got the screen to print the time elapsed when my car moves but cant get it to stop timing and also would like to help with resetting the timer, any ideas please???
Reply With Quote
Senior Member
sfunk's Avatar
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 11-13-2011, 04:46 AM

well use a boolean variable. have the variable be true while you want the timer to be running, then whenever you want the timer to stop have the variable set to false.

kinda look like this

If run_timer == true
(timer keep increaseing)

(if run_timer == false
timer stop increasing)

It won't look exactly like that since im not sure what kind of timer you are using.

And to reset the timer, just use an if/else statement that sets the value of your timer back to what you want it to be once it meets the criteria

If you are stuck on a project, check out the tutorials I made here at this link:

There are lots of tutorials on it so far, including some youtube videos, check it out


Go to my youtube channel to check out my alice 2.2 tutorials I have there..
Reply With Quote
How do i get a timer to reset?!?
Junior Member
Status: Offline
Posts: 1
Join Date: Dec 2011
Angry How do i get a timer to reset?!? - 12-05-2011, 11:56 PM

I am making a game where a car has to find a cube in 10 seconds. Yet if they find the cube or run out of time, they are asked if they want to play again. My only problems is getting the timer to reset to 10 seconds and countdown again!! SOMEONE PLEASE HELP ME!
Reply With Quote
Status: Offline
Posts: 38
Join Date: Nov 2011
Default 12-06-2011, 03:51 AM

Check out the timer object I posted to this thread. It should do what you need.

For video tutorials on programming in Alice 2.2 check out my YouTube channel

Also check out my Programming in Alice blog at
Reply With Quote

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 ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.