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 direction the sprite faces will change which direction it moves when moving forward.
Artist
If this block is being used with Artist, then by default, the sprite that will be moved is the artist, as no other sprites can be generated in an Artist lesson. Therefore, this block's Artist version does not allow you to choose which sprite to turn. Whenever the artist moves (not jumps), it will draw along the path it moves.
Examples
Example 1
This airplane moves "forward". All sprites move to the right by default.
Example 2
The artist draws a square.
Syntax
moveForward
Parameters
Name | Type | Required? | Description |
---|---|---|---|
sprite | The sprite or sprite group moving forward | ||
number | The number of pixels the sprite is moving forward |
Tips
- Using this block with
turn
orchange 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 support@code.org.