Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make clones receive broadcasts?
- mrcreatorluigi
-
Scratcher
1000+ posts
How to make clones receive broadcasts?
https://scratch.mit.edu/projects/564608225/So I was creating an animation when pressing a button but I can’t find a way clones can detect broadcasts. There’s no
[message1 v] received?::boolean events
block so I have to think of another way. All I need is some way to make clones detect broadcasts, that’s it. I want it to happen in the “Sliding Door” sprite.
- Just_Iakov
-
Scratcher
100+ posts
How to make clones receive broadcasts?
A bit confused on what you really want here. Clones can receive broadcast messages by using this block.
This block can pretty much be detected by both sprites and the clones, but if you want only clones to be affected by the broadcast then you can do something like this:
*Make sure to set AmIClone? variable to for this sprite only.
We have assigned the roles to both sprites and clones (whether they are clones or not.)
I could be wrong with what you really want, but I hope this could help you out.
when I receive [event]
This block can pretty much be detected by both sprites and the clones, but if you want only clones to be affected by the broadcast then you can do something like this:
*Make sure to set AmIClone? variable to for this sprite only.
when green flag clicked
set [AmIClone?] to [no] //for this sprite only
when I start as a clone
set [AmIClone?] to [yes] //for this sprite only
We have assigned the roles to both sprites and clones (whether they are clones or not.)
when I receive [event]
if <(AmIClone?) = [yes]> then
some script
end
I could be wrong with what you really want, but I hope this could help you out.
- mrcreatorluigi
-
Scratcher
1000+ posts
How to make clones receive broadcasts?
-snip-Doesnt work. And what I mean is when this broadcast is received, the clones would want to detect it as well. Hope that helps makes you understand
when I receive [about me v]
if <(clone?) = [1]> then
…
end
- mrcreatorluigi
-
Scratcher
1000+ posts
How to make clones receive broadcasts?
Problem solved! Turns out the script you posted worked, just had to change it a tiny bit.
- Discussion Forums
- » Help with Scripts
-
» How to make clones receive broadcasts?