move () steps

From PenguinMod Wiki (Official)
Move () steps
Jump to navigation Jump to search

Images needed

This article needs images or better quality images. You can help PenguinMod Wiki (Official) by adding the images or uploading them.

The move () steps block is a Stack block and a Motion block. It originates from Scratch. When used, it would move the sprite in a specified amount of steps to the direction the sprite's facing.

This block can be useful if you want the sprite to move to where ever you want without having to make complicated methods.

Workaround

There are three ways to make this block, using the move back () steps block with a negative number, or by using trig.

move back ((-1) * (...)) steps::motion
go to x: ((x position) + (([sin v] of (direction)) * (steps))) y: ((y position) + (([cos v] of (direction)) * (steps)))
change x by (([sin v] of (direction)) * (steps))
change y by (([cos v] of (direction)) * (steps))

The 3rd workaround does not work properly if the pen is down.