Alice Community  

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

Reply
 
Thread Tools Display Modes
Determine a winner for a racing game?
Old
Heromaster111
Guest
 
Status:
Posts: n/a
Default Determine a winner for a racing game? - 12-02-2009, 10:23 PM

How would you go about it? Would you use an if/Else statement? Need help with this. thanks in advance
   
Reply With Quote
Old
kylefwlr
Guest
 
Status:
Posts: n/a
Default 12-04-2009, 06:00 PM

to do that i would imagine making a dummy object and setting a max number of laps, maybe make a dummy object at the start and when a car goes by it increment their lap variable by one and make and put an if in a loop statement maybe a while that runs infinitely with an if inside it to say if laps reaches so many then set opacity of some letters to 1(100%) and then to prevent another racer from starting that, make it set the while condition to false for all the cars
   
Reply With Quote
Old
Scott300
Senior Member
 
Status: Offline
Posts: 80
Join Date: Feb 2009
Location: Ohio
Default 12-07-2009, 03:38 AM

I would make a number of objects around the track, check to see if a player passes it, make sure they passed them all and didnt just go backwards save it in a variable each time they pass one, than when they get past them all and back to the first, reset all the variables back to false and put lap +1, than check each time to see if they have achieved the number of laps to win.
  Send a message via AIM to Scott300 Send a message via MSN to Scott300  
Reply With Quote
Reply


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