Procedures are used to help you organise your code into manageable chunks. Usually any one procedure should only perform one specific task. In our WaterDrop example, our Umbrella currently does two things - it moves (using cursor keys) and makes raindrops disappear. We need 2 separate procedures, one for each task.
Procedures become really useful when your code is large. It makes it easier to read/understand and easier to maintain when something goes wrong.
Click on the video tutorial below and understand how to re-organise your code
Key Code to remember
Click on the video tutorial below and understand add how to play sounds through your game
Key Code to remember
Note: We need to put the Greenfoot.playSound code inside the if statement, so that it only plays IF the Umbrella and WaterDrop collide.
Click on the video tutorial below and understand how to make Actors appear based on x and y co-ordinates
Key Code to remember