Ask block for variables in clones

Tgis may be simple, but after manual punding and scouring the forum, I still have a missing link in my brain.

I have named clones of a master sprite, with a (debugging) “say" block in the master sprite that reports a value. That can be different in diffent clones, so I think there should be values I can access with an “ask" block. Clone “pd” reports a value, clone “R” reports a different value (using the “say" block, as above).

But try as I might I cannnot access this value from another sprite. I can use “ask" to find. the built in values: I suspect I don’t know how to target the clone (I’ve been down rabbit holes looking for "clone reporters”…)

Screenshot 2024-05-01 at 07.50.49

Hello. could you share your project?

Sometimes, you can just make a sprite-only variable storing the value, then ask for the value with [scratchblocks]([variable v] of [sprite v])[/scratchblocks].

Thanks. I’m so new to Snap that I have not yet figured out how to share…that’ll follow. The only sensing block I can find is this
Sliders script pic
Which lists the names of the variables, not the values. ( I searched for “of” across the blocks). Even then the RH dropdown does offer the names of the clones.

Here's an example

Not a good idea to link to dev version particularly when helping newcomers -just leads to confusion :slight_smile:

Oops. Fixed.

Thanks. One step forward…I’ll figure out how to share what’s going on. My clones (generated by code) are not listed below the stage.

If I clone in your example by right-clicking, they are listed..

Did you make the clones permanent?

If you need help, check out my example project. I updated it.

If it's a temporary clone, you can store it in a variable or list, and put the variable or list item into "ask":
untitled script pic
(Don't forget to ringify the variable you're trying to access.)

Or, you could use the built-in [scratchblocks]([variable v] of (clone))[/scratchblocks].

here is the epicentre of confusion

I probably need to go back to pencil and paper, because if I make clones permanent, they loose their allocated name, unless I’m doing it all wrong.

Thanks for your help, one and all

You need to set their name after you make it permanent, like this:

Doing that creates a new sprite with the correct name
Sliders script pic


another “block” removed, thanks. Now working on deleting the clones from a block… gradually building a mental model of this environment (Deleting Clones - #2 by jguille2)