Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » the "[backdrop #] of [stage]" block with for this sprite only variables.
- crstalgem228
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
hey, I need help figuring out how this block works.
let's say I have 2 sprites, with one that has a variable for this sprite only. (activated)
the other sprite needs to run a script where it can only run if the second sprites variable equals true. this is where I think this block might come into use, but for some reason, it doesn't work
first sprite:
second sprite with activated variable set to this sprite only:
let's say I have 2 sprites, with one that has a variable for this sprite only. (activated)
the other sprite needs to run a script where it can only run if the second sprites variable equals true. this is where I think this block might come into use, but for some reason, it doesn't work
first sprite:
second sprite with activated variable set to this sprite only:
Last edited by crstalgem228 (April 18, 2023 18:16:34)
- greentreebee
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
try instead of mouse down?, try this:
but i dunno
or try the custom block removed
but i dunno
or try the custom block removed
Last edited by greentreebee (April 18, 2023 18:14:12)
- medians
-
1000+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
Uhm, why specifically those 2 options?
Also, can you send the link to the project, explain what it’s meant to do, and what it’s actually doing?
Also, can you send the link to the project, explain what it’s meant to do, and what it’s actually doing?
- crstalgem228
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
okay! wait, I edited the original post to be more correct about what I was trying to do. hold on let me share my project real quick so you can see Uhm, why specifically those 2 options?
Also, can you send the link to the project, explain what it’s meant to do, and what it’s actually doing?
- crstalgem228
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
here is the link: Uhm, why specifically those 2 options?https://scratch.mit.edu/projects/815972815
Also, can you send the link to the project, explain what it’s meant to do, and what it’s actually doing?
to see the problem, go to the sprites crop pot, and crops. there should be a comment where the problem is
- crstalgem228
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
oh, and what it's meant to do is have the seeds grow when the pot is watered. the pot needs to be a clone so you can buy more of them Uhm, why specifically those 2 options?
Also, can you send the link to the project, explain what it’s meant to do, and what it’s actually doing?
- 10data10
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
It looks like you want to test the value of a local variable of a clone (the crop pot).
The Scratch Team does not let you use something like
I keep asking people to support a suggestion to let this work but it’s not drawing much attention.
However, for your project, do you care if just one crop pot gets watered or all of them? If they all get watered at the same time then maybe just make the watered variable be global.
The Scratch Team does not let you use something like
I keep asking people to support a suggestion to let this work but it’s not drawing much attention.
However, for your project, do you care if just one crop pot gets watered or all of them? If they all get watered at the same time then maybe just make the watered variable be global.
- 09878901234321
-
500+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
They would likely have to add a new block for this. It looks like you want to test the value of a local variable of a clone (the crop pot).
The Scratch Team does not let you use something like
I keep asking people to support a suggestion to let this work but it’s not drawing much attention.
However, for your project, do you care if just one crop pot gets watered or all of them? If they all get watered at the same time then maybe just make the watered variable be global.
You can get the value of a clones variable with a broadcast and a variable.
- 10data10
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
Yes, thanks for asking. The block would be They would likely have to add a new block for this.
and the suggestion is here https://scratch.mit.edu/discuss/topic/7455
Just in case you wanted to take a look. But we don’t have that so …
Yes, but you can’t have all of the radish clones making the same broadcast in the same frame. You can get the value of a clones variable with a broadcast and a variable.
But in this case it might be easier to just make it so if one crop pot is watered then they all get watered and make the watered variable be global.
Otherwise you will need to keep track of which radishes are growing in which crop pots and have some way to serialize the next cycle broadcast because you can’t have all of the radish clones making the same broadcast to all of the crop pots clones to individually answer the “watered” question in the same frame using a global variable. Or you can create a list for the crop pots and keep each separate watered status in list elements.
And then your next issue is know what crop pots your player put the radishes into.
You can’t have a radish clone do something like:
I suggest numbering the crop pot clones and just asking the player using an ask block to indicate which crop pot clone to use for planting each radish clone. However, there is one program by a scratch member that sort of shows how to know which specific clone is being touched by another clone but it’s a little involved and iffy: https://scratch.mit.edu/projects/664601726
Last edited by 10data10 (April 19, 2023 13:53:37)
- medians
-
1000+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
oh my god Uhm, why specifically those 2 options?
Also, can you send the link to the project, explain what it’s meant to do, and what it’s actually doing?
Default in 2.0 when there are no sprites:

Default in 3.0 when there are no sprites:

Default in 2.0 when there are sprites:

(it's the most recently created one)
Default in 3.0 when there are sprites:

Last edited by medians (April 18, 2023 21:22:11)
- 10data10
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
I don’t think we gave you any real help with the problem you mentioned inside of your project. to see the problem, go to the sprites crop pot, and crops. there should be a comment where the problem is
Your artwork is really good and it is a good project idea but it looks like you had a intuitive need to make one clone access the local variables of another clone and also to know when one clone is touching another clone. People do that but it’s not that straightforward.
One thing I didn’t think of until the forums were down for hours was the more common workaround of doing more with cloning. If you merge the pot clones and and the radishes clone then it becomes easy to tell when the seeds should become radishes; you could combine the costumes: An empty crop pot, a pot costume with a seed, then another crop pot costume with grown radishes.
Good luck with your project.
- iiDk__
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
can't u like It looks like you want to test the value of a local variable of a clone (the crop pot).
The Scratch Team does not let you use something like
I keep asking people to support a suggestion to let this work but it’s not drawing much attention.
However, for your project, do you care if just one crop pot gets watered or all of them? If they all get watered at the same time then maybe just make the watered variable be global.
- 10data10
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
That does not return the value of a local variable of a clone of the crop pot sprite - which is what I believe the author was intuitively trying to do. can't u like
Last edited by 10data10 (April 20, 2023 14:29:09)
- crstalgem228
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
I have fixed the problem, everyone! thank you. what I did to fix it is to have the pot create a clone of another sprite that goes to the pot that's watered. and then I can use the other sprite to grow the seed when the seed touches it. this will also help with pot collisions when placing down more pots so you cant put them on top of each other. this does use more clones, but the clones for the watered pot detection don't use forever loops so it should be fine
I hope this made sense
I hope this made sense
- loganthabear
-
58 posts
the "[backdrop #] of [stage]" block with for this sprite only variables.

- loganthabear
-
58 posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
- loganthabear
-
58 posts
the "[backdrop #] of [stage]" block with for this sprite only variables.



- HogwartsTeacherSnape
-
100+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
Yeah I was thinking both those same things. Uhm, why specifically those 2 options?
Also, can you send the link to the project, explain what it’s meant to do, and what it’s actually doing?
- loganthabear
-
58 posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
- medians
-
1000+ posts
the "[backdrop #] of [stage]" block with for this sprite only variables.
This topic is from a while ago by the way.
Yea, I figured out that backdrop # and stage are the default options for that block in 3.0, which is why the original poster picked those options in the title.Yeah I was thinking both those same things. Uhm, why specifically those 2 options?
Also, can you send the link to the project, explain what it’s meant to do, and what it’s actually doing?
Doesn't work, that block just returns the value for the main sprite. can't u like
Last edited by medians (Jan. 24, 2024 00:06:48)
- Discussion Forums
- » Help with Scripts
-
» the "[backdrop #] of [stage]" block with for this sprite only variables.