Create a simple hide a seek game where scratch has to find another character on the screen!
Step 1 – Moving sprites to a random location.
When we want to move sprites to a random location, we need to use the random block.
In order to move the sprites we should set their X and Y coordinates to numbers to numbers within the stage.
Can you work out what numbers to put in the scratch blocks below to make the code work?
Step 2 – Move Scratch with the arrow keys
By now this should be easy for you!
Step 3 – Make the boy sprite hide at the start of the game and appear when the scratch finds him!
See if you can rearrange the code below and add it to the boy sprite to get him to appear when scratch is near him!
Why do you think we have used :
Why will touching Sprite1 not work?