Discuss Scratch
- Discussion Forums
- » Suggestions
- » Clone-Sprite Variables And clones Receiving Broadcasts
- k9lego
- Scratcher
1000+ posts
Clone-Sprite Variables And clones Receiving Broadcasts
It would be nice to be able to have variables local to a sprite, but available to the clones of that sprite.
And it would be nice if clones could receive broadcasts like that one:
And it would be nice if clones could receive broadcasts like that one:
when I receive [Qwerty v]Any thoughts? k9lego
- Let's Eat Grandma! This is a hidden advertisement for the Collab Hyper Cloud Inc. :)
- Let's Eat, Grandma!
Commas Save Lives!
Nothing Much here…
If you want to reply to me, please comment with the link to the topic “On my profile page”. thanks. k9lego
- AonymousGuy
- Scratcher
1000+ posts
Clone-Sprite Variables And clones Receiving Broadcasts
Clones can receive broadcasts.
Just do this:
Anyways I do support the idea of global, sprite local, and clone local variables.
Just do this:
when gf clicked
set [clone v] to [0] //clone is a local variable
create clone of [myself v]
when I start as a clone
set [clone v] to [1]
when I receive [somemessage v]
if <(clone) = [1]> then
clone scripts //category=grey
else //Or if you want clone-specific scripts don't use an if-else, just use an if
sprite scripts //category=grey
end
Anyways I do support the idea of global, sprite local, and clone local variables.
- k9lego
- Scratcher
1000+ posts
Clone-Sprite Variables And clones Receiving Broadcasts
Good to know; I'll make sure to remember that. Thanks, k9lego.
- Let's Eat Grandma! This is a hidden advertisement for the Collab Hyper Cloud Inc. :)
- Let's Eat, Grandma!
Commas Save Lives!
Nothing Much here…
If you want to reply to me, please comment with the link to the topic “On my profile page”. thanks. k9lego
- Discussion Forums
- » Suggestions
- » Clone-Sprite Variables And clones Receiving Broadcasts