Alice Community  

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

Reply
 
Thread Tools Display Modes
Random movement of Objects
Old
merlyn
Guest
 
Status:
Posts: n/a
Default Random movement of Objects - 06-29-2010, 08:59 PM

Hello Alice community, I am working on my project for school. The professor wants the class to have 5 objects move in different random directions. How do I do this? Can anyone offer any help.
   
Reply With Quote
Old
angelxero
Guest
 
Status:
Posts: n/a
Default 06-29-2010, 10:42 PM

I actually did that about 2 weeks ago. It's remarkably simple. The instructions for this are actually in Learning to Program with Alice. Chapter 6, p. 191; the directions in the book are pretty easy to follow. Basically, you just create a movement method for the object; then replace the number with the random number function, which is found under world's details.
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.