Alice+-+Hunter+Sample

1. Open Alice

2. Start New World

3. Save your world as: "lastnameHunterPrey"

4. Select a Predator (I selected Husky) Click "Add Objects"



Select Animals Folder



Select Animal



Click "Add Instance to World"



Click Done



5. Select Prey (Repeat above steps) (I selected the Rabbit)



6. You want the Hunter to pursue the Prey. It must move and turn to face prey.

Click Predator one time (Husky in this Example) Select "Create New Method"



Name your method "Hunt"



Drag to following scripts into the Wolf.Hunt Method

Husky Turn to Face Rabbit Duration .25 seconds style Abrupt



Husky move forward 1 meter Duration .25 seconds style Abrupt



Put these blocks inside a "do together."



7. Click on World My First Method Tab



8. Drag a "Loop" Block into World My First Method. Select infinity.



9. Click on the Husky - Drag the "Hunt" method into the Loop in World My First Method



10. Click "Play" the wolf should move toward the Rabbit.

11. The Rabbit needs to run away - we will now create a method for the rabbit to move away from the wolf.

12. Click the Rabbit.

13. Click "New Method" and type "RunAway"



14. In the Rabbit.RunAway method add the following scripts:

Turn Left



Random with range from -25 to 25 divided by 50 (Under World - Functions)



Duration 1 second



Style: Abrupt

Move Forward 5 meters Duration: 1 second Style: Abrupt



15. Put these Scripts inside a Do Together



16. Modify the "World My First Method" to these scripts

Add If Else Statement and put a "Bunny is within 1 meter of the entire Husky." (This is found in the "Functions" area of the the Bunny.



Add a Loop Statement and readjust blocks.



Put Add the "Do Together" and regroup blocks.



17. Add Camera Point at Rabbit Forever Duration 0 style abrupt. Put all three loops in a "do together." Click play and watch the Husky chase the rabbit!



Save your work. Show to Mrs. Grams.

[|http://nebomusic.net]