Alice Community  

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

Reply
 
Thread Tools Display Modes
Need help keeping time and displaying it.
Old
uwontprevail
Junior Member
 
Status: Offline
Posts: 1
Join Date: Nov 2012
Default Need help keeping time and displaying it. - 11-28-2012, 02:39 PM

I am trying to figure out how to make a timer that counts down from X number and goes down by 1 point every 2 secs or so. Then i need to figure out a way for the else/if statement to show the current number when the if triggers.

this is for a frogger game that i am making, and i have everything finished except this part.

if anyone could point me in the right direction, i would be extremely thankful.
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 11-28-2012, 07:29 PM

I haven't given anyone help with Alice in a while, but I'll try...


1) Create a 3D Text object. It should be at the very end of the gallery. Move it to wherever you want your timer to be, and make sure it faces the camera. Set its text to the number of how much time you want.
2) Create a number variable called "time". Set it to how much time you want.
3) Make an event that says
While the world is running,
While time>0,
Wait 1 second
time decrement by 1
3D Text set text to (int [time as a string] as a string) duration = 0 seconds
STUFF

and replace STUFF with whatever you want to have happen when time runs out.


I made a quick example world with a timer, you can check it out.
Attached Files
File Type: a2w timer example.a2w (268.2 KB, 10 views)


Thank you for taking the time to read this signature. This signature loves you.
   
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.