Is clone?: Difference between revisions
Is clone?
Content added Content deleted
(Created page with "thumb|206x206px The is clone? block is a boolean used for clones to detect if they are a clone or the main sprite. Useful for broadcast blocks.") |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Blocks |
|||
⚫ | |||
|block_img = <gallery> |
|||
The is clone? block is a boolean used for clones to detect if they are a clone or the main sprite. Useful for broadcast blocks. |
|||
⚫ | |||
IsCloneRuntimeBlock.png|Block (Runtime Modifications) |
|||
IsCloneWorkaround.png|Workaround |
|||
</gallery> |
|||
|block_type = Boolean Block |
|||
|category = [[Clones+]]<br>[[Runtime Modifications]] |
|||
|title = is clone? |
|||
}} |
|||
The '''is clone?''' block is a boolean block used for clones to detect if they are a clone or the main sprite. There are versions of this block in the [[Clones+]] extension in the [[Runtime Modifications]] extension, and formerly the [[Clone Communication]] extension. |
|||
==Uses== |
|||
It can be used for broadcasts to run scripts for only the sprite or for only clones, as clones receive broadcasts. |
|||
==Workaround== |
|||
This block can be worked around by using the fact that each clone has their own copy of a variable if it is sprite only, so creating a sprite only variable and setting it to 0 for the main sprite but 1 when clones are created and checking the value works. |
|||
{{DISPLAYTITLE:is clone?}} |
|||
[[Category:Clones+ Blocks]] |
|||
[[Category:Clone Communication]] |
|||
[[Category:Boolean Blocks]] |
|||
[[Category:Runtime Modifications Blocks]] |
|||
[[Category:Extension Blocks]] |
Latest revision as of 17:49, 3 March 2024
is clone? | |
---|---|
[[File:
| |
Block Type | Boolean Block |
Category / Extension | Clones+ Runtime Modifications |
The is clone? block is a boolean block used for clones to detect if they are a clone or the main sprite. There are versions of this block in the Clones+ extension in the Runtime Modifications extension, and formerly the Clone Communication extension.
Uses
It can be used for broadcasts to run scripts for only the sprite or for only clones, as clones receive broadcasts.
Workaround
This block can be worked around by using the fact that each clone has their own copy of a variable if it is sprite only, so creating a sprite only variable and setting it to 0 for the main sprite but 1 when clones are created and checking the value works.