# Remix of Sqoosh's 'Falling Sand' Project UPDATED

Remix of sqoosh's falling sand project she posted about here in forum.

In my remix, 'groundedness' of the clone positioned below the current clone is sensed using the other one's clone-local variable instead of its costume name.

EDIT
The remix has been updated. Now you can lift up the sand by touching it (even when it is grounded) and move the pile to the left as shown in the updated video.

I originally attempted this before switching to the costume method because I couldn't figure out how to access a clone's local variables, thank you for a little more insight into how that works, and thank you for remixing this.

I agree it's not very discoverable. I wish it wouldn't require two steps, but one step only instead (however I don't know if that is possible).

Actually, Jens has the power to make it one-step-process only.

Here's how. When user drags the 'of' block from the sensing category to a sprite's scripting area, the second slot could be defaulted to the sprite itself so its local variables would be automatically listed in the first slot.

What do you think?

Ah. I see.

Not a bad idea, this could be the same for the stage as well where it would be automatically set to Stage, in the custom block dialogue it'd probably be the default blank.

Can you give an example? I'm not sure what you mean.

When you create a custom block, the scripting area is neither the sprite nor the stage, thus defaulting to stage or sprite option is not applicable.

Point is that you shouldn't ever design your program to need accessing a local (!) variable - or any local state - of another sprite. I get that y'all have been brainwashed into believing that controlling everything from a single script is somehow "elegant" or "expressive" or "how the real programmers do it", but ... it's not! Instead signal an event and let interested sprites react to it. Instead ask/tell the clone to do something, and let it handle the response. Before I get flamed for writing this: Yes, I know you can do it in Snap and I'm not telling you not to, but if you insist on doing it wrong I might as well nudge you to at least do it in two steps.

Nobody taught me how a clone can "signal an event and let interested sprites react to it" in this case. Can you, please, show how it can be done in the case of sqoosh's project?

I think it is not fair to hmm <I-forgot-the-word-I'm-looking-for> malevolent intent to users, because no one "insists on doing it wrong"!

Seems rather redundant to have it as even an option if we're not supposed to do it that way.

Yeah, I agree.

Hey @sqoosh the remix has been updated. Now you can lift up the sand by touching it (even when it is grounded) and move the pile to the left as shown in the updated video above.

The rainbow looks cool. Seems like you removed stone sadly, but alright.

The stone can be added back. (In the first remix when I was testing a "local variables approach" instead of a costume name one, I probably removed the stone to be able to test a smaller amount of code).