Discuss Scratch

drmcw
Scratcher
1000+ posts

Which reporter blocks can you use with clones?

I've always found that using a reporter block such as x position, y position costume# always returns the values of the parent sprite not the value for a clone. The way around this was to create a local variable and update it accordingly. I've since found that I may be wrong in this. So has this changed recently and is there a list of reporter blocks that work ok with clones?

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
DadOfMrLog
Scratcher
1000+ posts

Which reporter blocks can you use with clones?

I think all reporter blocks work fine for clones within scripts (and always have done?)
However, if you show one on the screen (by checking the tickmark) then it will only show the value for the parent sprite (and what else could it do, really?)


Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

drmcw
Scratcher
1000+ posts

Which reporter blocks can you use with clones?

Thanks. How about for a When I receive broadcast? Do they still work in a broadcast block as well?

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
DadOfMrLog
Scratcher
1000+ posts

Which reporter blocks can you use with clones?

Oh yes, all clones receive broadcasts and run the scripts independently. It's an easy trap to fall into (if you only want the original sprite to run a broadcast received script, it's easy to forget and end up with all the clones doing it too…)

You need to have a way to identify clones (using some local variable) so you can tell the different clones (and original sprite) to do different things if you want them to behave differently on receiving it.

There are various topics about this, so a search should give plenty of useful tips (though you may well not need them…)



Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

drmcw
Scratcher
1000+ posts

Which reporter blocks can you use with clones?

I was aware of the broadcasting being received by everything thank. Still wondering why I was under the impression that reporter blocks didn't work with clones. Certainly remember being frustrated with them during the beta phase.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?

Powered by DjangoBB

Standard | Mobile