FANDOM


Y Position
Y Position
Category Motion
Type Reporter

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

Common UsesEdit

As this block holds its sprite's Y position, it can be used when a script needs to know its sprite's Y 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 Y 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 Y Position block

Other common uses are:

  • Changing a sprite's speed based on where it is on the screen
  • Comparing the Y position with a record to check for movement
  • Constantly storing a sprite's Y 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.