Alice Community  

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

Reply
 
Thread Tools Display Modes
Tag Program
Old
n00bInc
Guest
 
Status:
Posts: n/a
Default Tag Program - 02-24-2009, 07:16 PM

I am creating a program with a monkey and a chicken playing tag and I am having some issues. The program is supposed to select the randomly the chicken or the monkey, but with the chicken twice as likely to be selected. If the chicken is selected turn the chicken towards the monkey and move forward .5 meters, and if the monkey is selected he turns in a random direction and moves forward .5 meters. It will repeat until the chicken is within .5 meters of the monkey when he will say "Tag you're it."

I am having problems with the whole thing I have the random selection correct, but if the chicken is selected he will move towards the monkey and the program stops and if the monkey is selected he will spin forward through the ground and the program stops. Any help would be appreciated.
   
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.