Alice Community  

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

Reply
 
Thread Tools Display Modes
Lap counter for a racing game
Old
davise
Guest
 
Status:
Posts: n/a
Default Lap counter for a racing game - 10-09-2009, 09:33 AM

I am doing a school project and i have a boat racing game. To finish it i need to know how to make a lap counter for every time the boat passes the starting line. If someone could explain to me how to do that i would greatly appreciate it.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-09-2009, 08:04 PM

You'd need a 3d text, a number variable, and some way to register when the boat completes a lap (like a marker that it has to get close to).

Write a method so that when the boat passes the marker, the variable increases by one (increments) and the text sets it's "text" property to the variable as a string (the "What as string" function is under the world's functions).
   
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.