Alice Community  

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

Reply
 
Thread Tools Display Modes
penguins
Old
armory
Guest
 
Status:
Posts: n/a
Default penguins - 10-28-2009, 06:06 AM

i need to program a race between two penguins racing two wards a icehole. the one that gets there first says " I won" What is the best way to decide whitch penguin won and got there first?
   
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-30-2009, 12:00 AM

So should the winner be random, or is this just a movie that plays the same over and over again?

If it's random, then try this:

if chose true 50% of the time (you can find the chooseTrue function under the world's function tab)
penguin1 move forward 10 meters duration .75 seconds
penguin2 move forward 10 meters duration 1 second
else
penguin1 move forward 10 meters duration 1 second
penguin2 move forward 10 meters duration .75 seconds


(')>
   
Reply With Quote
Old
xxledzeppelin2x3
Guest
 
Status:
Posts: n/a
Default 10-30-2009, 03:31 PM

first off like x2495iiii said we need to know if it is a movie or a game??? also, thank you x2495iiii because i was trying to create a quick little game today in programming for some extra credit and you helped me with my question
   
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-31-2009, 01:19 AM

Glad I was able to help.


(')>
   
Reply With Quote
Old
xxledzeppelin2x3
Guest
 
Status:
Posts: n/a
Default 10-31-2009, 11:20 AM

another thing added to the quickbook of x2495iiii!

i think you should be the co owner of alice? haha
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.