Alice Community  

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

Reply
 
Thread Tools Display Modes
Fish help please
Old
Surefall77
Guest
 
Status:
Posts: n/a
Default Fish help please - 03-31-2009, 03:02 PM

We wanted to create a School of Fish and have them swim in random directions, Hes got his fish in the water and he has them built into a list so they will all move at the same time but we cant seem to get it to be random moves no matter how we program it. And when we thought we had them swimming randomly we couldnt keep them onscreen?

Fishy69's Code
Created by: Cath
world
Events
When the world starts
Do: world.my first method




Methods
world.my first method ( )
Fish Family =
Loop index from 0 up to (but not including) infinity times incrementing by 1
For all Fish Family , every item_from_Fish Family together
item_from_Fish Family move forward 1 meter
For all Fish Family , every item_from_Fish Family together
item_from_Fish Family turn right 0.25 revolutions


Its not random and it doesnt account for the fish going off screen
   
Reply With Quote
Old
draikon3
Guest
 
Status:
Posts: n/a
Default 04-01-2009, 07:54 AM

well, to tell you the truth there is no easy way to make it so that everything stays onscreen as everything moves away randomly. but it is doable. my suggestion is to just have them move randomly within an area
   
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.