- For the Operators block with the same name, see () of () (Operators block).
|() of ()|
Below are the values that can be reported:
- X Position
- Y Position
- Costume/Backdrop number
- Variables local to the specified sprite
If the block is used on a sprite which has clones, the reported value will be of the original sprite, and never of the clones. This makes it impossible to access information about clones using this block.
This block allows sprites and the Stage to have access to other sprites' special values. With this, projects can have a lot of connectivity between sprites.
This block renders eight blocks unnecessary:
Also, as of Scratch 1.4, the SpriteName area can have an expression/variable put into it so that a script can access any other sprite's variables or properties given that sprite's name. This is useful in projects where one wants to be able to generalize things:
set [index v] to  repeat (length of [names v]) change [index v] by (1) replace item (index) of [values v] with ([myVar v] of (item (index) of [names v]))
Some common uses for the () of () block:
- Making a sprite follow another by setting their X and Y positions to the X and Y positions of the other, plus or minus a certain amount:
when gf clicked forever go to x: (([x position v] of [Sprite2 v]) - (10)) y: (([y position v] of [Sprite2 v]) - (10))
- Waiting for a different sprite to reach a certain costume
wait until <([costume# v] of [Sprite2 v]) = (target)>
- Checking volume to adjust a sprite's own volume accordingly
set volume to ([volume v] of [Sprite2 v])%