Gets the location of a given sprite.
This block can be used to get the exact location of the center of a sprite, even when it moves around the screen.
This block allows one sprite to move towards another, no matter where it is on the screen. Here is a simple tag game where you can press the spacebar to make the chaser follow the runner.
The first sprite is drawn at a random location, but the second sprite is always drawn at the same place.
Name | Description |
---|---|
sprite | The sprite or sprite group whose location is being called |
Found a bug in the documentation? Let us know at documentation@code.org