Category:Actions

Moves the sprite the specified number of pixels in the direction it is facing.

By default, the block moves sprites to the right (or east). However, changing the sprite’s movement direction will change which direction it moves when moving forward.

Examples

Example 1

This airplane moves "forward". All sprites move to the right by default.

Example 2

Extra code changes the sprite's starting direction. You can also change direction with the arrow keys.


Parameters

NameDescription
sprite The sprite or sprite group moving forward
number The number of pixels the sprite is moving forward

Tips

  • Using this block with turn or change sprite property (rotation) can allow a sprite to move in the direction that its costume is facing.

Found a bug in the documentation? Let us know at documentation@code.org