Go To (Object) Block
-
Prerequisite
Description
The “Go to (object)” block is a stack block in the motion category.
How does this block work?
This block can move the current sprite in three different ways: “Go to (random position)”, “Go to (mouse-pointer)” and “Go to (a sprite)”.
You can choose the movement option for your sprite by clicking on the drop-down menu.
Go to (random position)
When the “random position” option is selected, this block will move the current sprite to a random position on stage. That means, whenever this block is played, the sprite may appear anywhere on the stage.
Go to (mouse-pointer)
Go to (mouse-pointer) is used to move the current sprite to the mouse pointer’s position.
Go to (sprite)
This block is used to move the current sprite to the same X and Y positions as the selected sprite.
Note: You need more than one sprite in your project to use this block.
For example, we can use it to make the basketball move to the same place as the soccer ball. Note that their centers will be aligned.