Table of Contents

go to x: () y: ()

Description

The block sets its sprite’s X and Y position to the specified amounts. This block has no animation in its movement — it is the simplest way to move a sprite around the screen without displaying any animation (i.e. gliding). Therefore, this block is used whenever a sprite needs to jump to another spot.

Example

The example demonstrates the use of clone and gliding function in Sprite. 

The example demonstrates the use of clone and gliding function in Sprite:

  1. Whenever the sprite is clicked, a clone is created.
  2. When a clone is created its position is set to a random position on the top of the stage and then it glides down to the bottom.
  3. When it reaches the bottom, the clone is deleted.

Script

Output

Read More
The example demonstrates how to use stamping and the mouse location sensing in Block coding.

Script

Output

Read More
The example demonstrates how to use keys sensing to control the movement of the sprite.

Script

Output

Read More
The example demonstrates how to add gravity into the project on a bouncing ball.

Script

  1. Main Script to change the speed and position parameters of the ball.
  2. Custom function to initialize the ball position and speed with random variables.
  3. Custom function to check the boundary conditions and set the rules.

Output

Read More
The example demonstrates how to add movement to a sprite using the key detection hat block.

Script

Output

Read More
All articles loaded
No more articles to load