X Position
X Position
Category Motion
Type Reporter

The X Position block is a Motion block and a Reporter block. The block holds its sprite's X position. This block can be displayed as a Stage monitor.

Common UsesEdit

As this block holds its sprite's X position, it can be used when a script needs to know its sprite's X position. There are many cases of this - for example, you could use the block to detect how far right you are on the screen.

An example script for the X Position block

Another use is setting values based on a movable slider - the script sets the value to the slider's X position.

Another example script for the X Position block

Other common uses are:

  • Changing a sprite's speed based on where it is on the screen
  • Comparing the X position with a record to check for movement
  • Constantly storing a sprite's X movement so it can be reenacted later

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.