Alice Community  

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

Reply
 
Thread Tools Display Modes
detect who wins
Old
nunofakir
Junior Member
 
Status: Offline
Posts: 1
Join Date: Nov 2011
Default detect who wins - 11-24-2011, 12:58 PM

i'm making a race game, i need to detect which car is the winner..

how can i make that?


i was thinking about somethin like that:

if car1 reach road10 then
print you win
else
print you lose

i dont know if it's possible or not

thanks in advance

Last edited by nunofakir; 11-24-2011 at 01:03 PM.
   
Reply With Quote
Old
dakota95
Senior Member
 
dakota95's Avatar
 
Status: Offline
Posts: 426
Join Date: Aug 2011
Location: like I would tell you. ;)
Cool 11-24-2011, 02:28 PM

Quote:
Originally Posted by nunofakir View Post
i'm making a race game, i need to detect which car is the winner..

how can i make that?


i was thinking about somethin like that:

if car1 reach road10 then
print you win
else
print you lose

i dont know if it's possible or not

thanks in advance
exactly like you said should work.


<Insert_Signature_Here>
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 11-24-2011, 09:24 PM

Well...no.

You would want something more like

Loop infinity times (or While the world is running):
If car1 is within 1 meter of road10
print "You win"
Wait Infinity seconds
Else
Do nothing

If car2 is within 1 meter of road10
print "You lose"
Wait Infinity seconds
Else
Do nothing

Though now that I think about it you'd also have to make stuff and make sure you can't just turn around at the start and win instantly and all that stuff...ugh racing games.


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.