Set X to ()
Set X to ()
Category Motion
Type Stack

The Set X to () block is a Motion block and a Stack block. The block changes its sprite's X position by the specified amount. This block, combined with the Set Y to () block, have the same effect as the Go to X: () Y: () block.

Common UsesEdit

If a sprite must go to a certain place, and the sprite's Y position never changes, the Set X to () block can be used instead of the Go to X: () Y: () block - there is no need to set the Y position when it never changes.

Another common use of the block is X scrolling - the sprites have to constantly change their X. The Set X to () block is normally used here.

Other common uses are:

  • Placing rocks randomly on a seabed
  • Setting random locations for raindrops that will fall
  • Resetting the X of a slider

Community content is available under CC-BY-SA unless otherwise noted.