Alice+-+Aiming+Objects

**__Lesson 1:__**
1. Start Alice

2. Click "Cancel" on First Window. (Or go "File-New" to start a new world.

3. Click the green "Add Objects" button and add an Object. (I picked the Tank Object.)

4. Click "DONE"

5. Click on "tank" in Object Tree



6. Create Method "aimRight" a. Click "create new method" b. Name method "aimRight"



7. Click on "+" sign next to "tank" in object tree.

8. Click on "turret."



9. Drag "turret turn" into "tank.aimRight" method window. a. Select "right" for direction b. Set revolutions to "0.1" d. Set duration to "0.25" seconds



10. Create Method "aimLeft" a. Click on "tank" b. Click "create new method" c. Name method "aimLeft"

11. Click on "turret."

12. Drag "turret turn" into "tank.aimLeft" method window. a. Select "left" for direction b. Set revolutions to "0.1" c. Set duration to "0.25" seconds

13. Create Method "aimUp" a. Click on "tank" b. Click "create new method" c. Name method "aimUp"

14. Click on "+" sign next to "turret"

15. Click on "barrel" 16. Drag "barrel" turn into tank.aimUp method window. a. Select "turn" and "backward" for direction. b. Set revolutions to "0.1" c. Set duration to "0.25 seconds.

17. Create Method "aimDown" a. Click on "tank" b. Click "create new method" c. Name method "aimDown"

18. Click on "barrel"

19. Drag "barrel" turn into tank.aimDown method window. a. Select "turn" and "forward" for direction. b. Set revolutions to "0.1" c. Set duration to "0.25" seconds.

20. Set Events for Aiming -> a. Right Arrow = aimRight b. Left Arrow = aimLeft c. Up Arrow = aimUp d. Down Arrow = aimDown

To Set an Event:

21. Click "create new event."



22. Select "When a key is typed."



23. Change "any key" to "Right"

24. Change "Nothing" to "tank.aimRight."



25. Set remaining Events: a. Left Arrow = tank.aimLeft b. Up Arrow = tank.aimUp c. Down Arrow = tank.aimDown



26. Click "Play" to and type the arrow keys to see your tank in action!

Ready - Aim - **Chicken!!!**

Our Tank is going to shoot Chickens out of the Tank! Here is an overview the steps:

A. Import Chicken Object

B. Create chicken.fire method for the "flying chicken" a. Call method chicken orient to tank.turret.barrel b. Set Chicken to Visable c. Set Chicken Vehicle to World d. Call method "move forward" 10 meters. e. Set Chicken to Invisable f. Call method chicken move to tank.barrel.turret. g. Set Chicken Vehicle to tank.barrel.turret.

C. Create Event for Space Bar to call method chicken.fire

//Step by Step Directions://

A. Import Chicken Object:


 * 1.** Click "Add Objects
 * 2.** Click "Local Gallery"
 * 3.** Click "Animals"
 * 4.** Select the "Chicken"
 * 5**. Click "Done"

(The chicken might be hiding inside the tank. Do not worry if you don't see the chicken.)

B. Create "Chicken.fire" method:

a. forward b. 10 meters c. duration = 0.5 seconds 23. Entire "Chicken.fire" method should look like this:
 * 6**. Click Chicken on Object Tree.
 * 7**. Click "create new method"
 * 8.** Name method "fire"
 * 9**. Drag "Chicken orient to" to method window
 * 10.** Select tank.turret.barrel
 * 11.** Set duration to 0 seconds
 * 12.** Click "Properties"
 * 13**. Drag Opacity to Chicken.fire method and set to 100% and duration to 0 seconds.
 * 14**. Drag Vehicle to method and set to "world."
 * 15.** Click "methods" tab.
 * 16**. Drag "Chicken move" to method and set following parameters:
 * 17**. Click on "properties" tab.
 * 18**. Drag Opacity to method and set to 0% with a duration of 0 seconds.
 * 19.** Click on "methods" tab.
 * 20**. Drag "Chicken move to" to method and set to "tank.turret."
 * 21.** Click on "properties."
 * 22**. Drag "vehicle" to method and set to "tank.turret."



C. Create Event for Space Bar calling Chicken.fire method.

26. Select Space Bar 27. Select Chicken.fire
 * 24.** Click "create new event."
 * 25.** Select "When a key is typed."
 * 28.** Finished "Events" window should look like:




 * 29.** Run your program by clicking "Play."

(You might need to add some methods to "world.my first method" to move the chicken to the turret.)

** Show to Mrs. Grams **
Thursday, May 3 - Friday, May 4 1. Select an Aiming Object and a Projectile Object. 2. Create a program where the aiming Object aims and shoots the projectile. Examples Include: Cannon and Cannon Ball. Person throwing ball or other object. Catapult. Person kicking an object. 3. Save your project. **Show to Mrs. Grams.** ||
 * ==**Assessment:**==


 * Continue - Conditional Statements**