Games meros1b

Video Transcript

In the game 'Grab the Bone', the dog is moved by the player in the labyrinth with the arrow keys on the keyboard.

Let's start our game by forming this. That is, the scenario that moves our sprite -our protagonist.

As a first step of course you have to start Scratch. Then, you have to delete the cat and enter the dog from the Scratch library.

Let me move on to these actions.

First, I need to change the sprite's size.

So, when the green flag is clicked, the size of the sprite is 25% of its original size.

Then I use the appropriate commands to make the dog look and move upwards if the user pushes the top arrow from the keyboard.

Obviously, we need a selection structure.

From the "control" tab we then need the IF command.

If the up arrow button is pushed then our character should point upwards but also move a little bit forward.

The commands that will be in the IF are in the "motion" command palette.

If a specific key is pressed, we will find it in the “Sensing” palette.

Let's create this IF and let me try it to see if it works.

We see something is wrong.

Our script does not work. The reason is obvious.

The script's instructions are executed one by one and the script ends before we hit the top arrow.

We want this code to run throughout the game.

We have to enter into a repeat order "Forever". Let's do it and let's try again.

Let's do it and let's try again.

Scroll to Top