In addition to determining mouse status, sprite collisions, and the distance between sprites, you can use the code block shown in Figure 6.12 to retrieve sprite and stage information.
This code block provides easy access to a number of pieces of information, including:
X position
Y position
Direction
Costume number
Size
Volume
As an example of how to work with this code block, take a look at the following script, which retrieves the X coordinate of a sprite named Sprite 2 and plays an audio file whenever that sprite is moved to the right-hand side of the stage (between coordinates 1 and 240).
3.15.218.133