Time for action – moving the dog based on x and y coordinates
In this exercise, we're going to use the x and y coordinates to move our dog:
Let's prepare the stage by hiding the horse1 sprite by right-clicking on the thumbnail in the sprites list and choosing Hide. Then, display the bedroom1 backdrop on the stage.
Next, add the dog2 sprite from the Animals category of Scratch's sprite library.
Position the dog so that it's talking into the microphone. Resize the sprite as necessary.
With the dog in position, let's find the x and y coordinates of the sprite so we can ensure the dog always returns to this position. Select the dog2 sprite in the sprite list and then click on the i icon on the sprite thumbnail to display the sprite properties pane as seen in the following screenshot:
Now, we'll create the script that always returns the dog to the spot in front of the microphone. From the Motion palette, drag the set x to () block to the scripts area. Change the value to the dog's x value. My example...