Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Random Motion Help (http://www.alice.org/community/showthread.php?t=6505)

george3356 05-09-2011 09:27 PM

Random Motion Help
 
So, for a school project I need to get a rabbit to chase a butterfly and try to catch it with a net. I need the butterfly to move in a random motion. I am using the code for the goldfish from the book (Learning Program with Alice p. 170) as a reference. What I need is to know how to get the lines to read like this:

Do together
butterfly move up {Random number minimum = min Maximum = max}
butterfly move left {Random number minimum = min Maximum = max}
butterfly move forward {Random number minimum = min Maximum = max}

Obviously I know how to get the move up/left/fwd in there, what I can't figure out is how to get the random number min/max part to get in there. Anyone know how to?
All help is appreciated, and the sooner the better. (I have 8 more assignments to finish by the 16th. :(

ieges 05-09-2011 09:44 PM

Go to world-functions, and there should be a random number section.

sfunk 05-09-2011 09:50 PM

well place the random number into the distance, and then click the more option on the random number, which gives you maximums and minimums, choose what you need, and there you go.

george3356 05-09-2011 10:50 PM

Thank you, (plus a cont. link)
 
[QUOTE=ieges;35486]Go to world-functions, and there should be a random number section.[/QUOTE]

Cool, thanks to both of you guys. I got this part of it done. I'm stuck on one more thing, if you guys think you may be able to help out that would be much appreciated.

[url]http://www.alice.org/community/showthread.php?t=6507[/url]


All times are GMT -5. The time now is 01:51 PM.

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.