Now that you have created your clouds you want to create the hero or in this case heroes of the game. Every game needs a hero and in this game the heroes happen to be a raindrops.
Create a raindrop sprite using the raindrop image included in the resource files and connect it to an object.
Click the add event button and select keyboard from event selector window. From the drop-down menu select left. You'll see the event you selected appear in the events column of your object properties window.
WHY DID I DO THAT?
An object won't follow instruction unless it's told to. Objects wait events to happen such as a mouse click, a button press, or even when the object is created. Once those events happen, the object begins following instructions.
From the move tab at the right of the object properties window drag the move fixed action into the actions column. When the move fixed settings window appears, click on the left arrow button so that it changes color from blue to red. Then change the speed from 0 to 5.
Click the ok button to save the moved fix action. You'll see the action you selected appear in the actions column.
Repeat this for right, up, and down keyboard events.
ow the raindrop has instructions to move up, down, left and right by using the arrow keys on the keyboard, but there is one more thing you need to do. You need to give the raindrop instructions on what to do when you let go of the arrow keys otherwise it will keep moving forever.
Click the add event button in the raindrop object properties window and select keyboard from the event selector window. From the drop-down menu select no key.
You'll see the event you selected appear in the events column.
From the move tab at the right of the object properties window, drag the move fixed action into the actions column. When the move fixed settings window appears, click on the center square button so that it changes color from blue to red. The center button means in no direction.
Click the ok button to save the move fixed action. You'll see the action you selected appear in the actions column.
WHY DID I DO THAT?
Computers will do whatever we program them to do, sometimes that means you need to think about all the possibilities. In this case, we told the computer to move in a direction when the player presses an arrow key. The problem is that when we let go of the arrow key, the computer thinks that it should keep moving.
To fix this, we give the computer instructions on what to do when we do not press any key, in this case we tell the computer to stop moving.