Eng:Distance (Sensing value)

Distance is a value that detects how far away a sprite is to another sprite's costume center, in pixels.

Detecting Distance
The associated block has a drop-down menu. Select the sprite you want to detect the distance from, and get the distance to display through a variable's stage monitor, the block, etc.

If there is nothing in the drop-down insert of the block, or if a sprite that was deleted is still in the drop-down insert, it reports the distance as 0.

Example Uses
Here are some ways this value can be used:
 * Detecting distances from an invisible sprite and displaying the score as a game
 * Making a variable change when you move the sprite around from another sprite