y position
Y position
y position | |
---|---|
y position | |
Block Type | Reporter Block |
Category / Extension | Motion |
The y position block is a reporter block that reports the current y position of the sprite. It originates from Scratch. The default y position for paint sprites or blank sprites is 28, while other new sprites start at a random position. In the default project, the Penguin sprite is at (0, 0).
Workaround
This block can be worked around by using a variable to save the y position when the set y to () or change y by () blocks are used:
define set y to (number1) set [y pos v] to (number1) set y to (number1) define change y by (number1) set y to ((number1) + (y pos))::custom
However, this workaround does not account for the y position limit if offscreen, or "Remove Fencing" is disabled.