Move () Steps (block)

From the Scratch Wiki — made by Scratchers, for Scratchers.
Jump to: navigation, search
Move () Steps
Move () Steps.png
Category Motion
Type Stack
Introduced in 1.0

The Move () Steps block is a Motion block and a Stack block. The block moves its sprite forward the specified amount of steps in the direction it is facing, a step being 1 pixel length.

Assuming the blue grid shows individual pixel positions, using a move 1 step gets the Scratch cat to the red circle, its final position along the circle depending on its direction. Moving 2 steps gets to orange, and moving 3 steps gets to green.


Workaround

Main article: List of Block Workarounds

This block can be replicated with the following code:

change x by (([sin v] of (direction)) * (number))
change y by (([cos v] of (direction)) * (number))

Example Uses

Instead of using complicated scripts with the Change X by () block and the Change Y by () block, this block can be easily used to move a sprite forward.

Some common uses for the Move () Steps block:

  • Moving a sprite forward in an animation
repeat (10)
 move (10) steps
end
  • Making a sprite follow the mouse
forever
 point towards [mouse-pointer v]
 move (10) steps
end
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox