ADDING THE BADDIES
56. Right click the Background image > Insert New Object > Sprite > click once on the Background image > Load Image from a File > TazDevil > close Edit Image window.
57. Position the sprite on the right side of the Layout 1 window, and rename it to TazDevilRight.
58. Right click the Background image > Insert New Object > Sprite > click once on the Background image > Load Image from a File > TazDevil.
59. Before you close the Edit Image window, click on the Mirror button at the top of the window to mirror the image so that it is facing the other way.
60. Position the sprite on the left side of the game window, and rename it to TazDevilLeft.
61. Run the game and try it out!
You will notice that, although the Devils appear in the game window, nothing happens when a collision occurs with a Monkey. When a monkey collides with either TazDevilLeft OR TazDevilRight, the monkey should be destroyed. You can add an OR block in the Event Sheet 1 to deal with this condition.
62. Switch to Event Sheet 1.
63. Click on Add Event > double click MonkeyOne > double click On Collision with another Object > Object TazDevilLeft > Done.
64. Right click on the green arrow to the left of MonkeyOne and select Make ‘Or’ Block:
65. Then, right click on the same green arrow and select Add, Add another condition:
66. Double click on MonkeyOne > On collision with another object > TazDevilRight > Done
67. Add Action > MonkeyOne > Destroy.
68. The events and actions you just entered should appear as follows. You should be able to clearly see the ‘OR’ condition you added:
69. Repeat the same steps for both the MonkeyTwo and MonkeyThree.
70. The collision events between the monkeys and TazDevils should appear as follows:
71. Save the game and try it out!
*Check that the Monkeys disappear on collision with either of the TazDevils.
Note that the above collisions could be better dealt with by the use of Families (where each monkey becomes part of a family and the collisions only have to occur using the family name you specify). This saves you from having to type in repetitive collision events and actions. However the Families option is not available in the free version.*