Discuss Scratch
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
Edit: Areas now are oriented counterclockwise.
This block would allow you to click an area of a sprite. It looks like this.

For a better explanation, starting from the closest area to 12:00 as Area 1, it goes counterclockwise.
If this was a boss clicker game, clicking on his tail might do some damage, but his head would do more.
If this was a take-apart-and-put-back-together game, you would have to have the areas in the right place. Ignore this
I'ma get screamed at for this last one
If it was a salvage game, you would have to remove the right piece to avoid a jumpscare.
You see what I'm getting at? Neat block. But, I'ma predict the future: No support.
If this is a duplicate I will punch my computer
This block would allow you to click an area of a sprite. It looks like this.
when area [ v] of sprite clicked :: events :: hatThis way, you can click an area of a sprite for a different function. Not sure what I mean? Let's take a look at our friend the Scratch Cat.

For a better explanation, starting from the closest area to 12:00 as Area 1, it goes counterclockwise.
If this was a boss clicker game, clicking on his tail might do some damage, but his head would do more.
If this was a take-apart-and-put-back-together game, you would have to have the areas in the right place. Ignore this
I'ma get screamed at for this last one
If it was a salvage game, you would have to remove the right piece to avoid a jumpscare.
You see what I'm getting at? Neat block. But, I'ma predict the future: No support.
If this is a duplicate I will punch my computer
Last edited by The-Molten-Freddy (June 14, 2022 20:28:17)
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
Oh shoot this needs to be in suggestions
- IndexErrorException
-
500+ posts
When area ___ of sprite clicked
How would one define areas of a sprite? How would one know which area to target? There should also be current touching area reporter. Very specific but difficult to workaround, support.
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
Do you see my picture? That's how it's defined. As for the detect, good idea. How would one define areas of a sprite? How would one know which area to target? There should also be current touching area reporter. Very specific but difficult to workaround, support.
Last edited by The-Molten-Freddy (June 14, 2022 19:39:18)
- musicROCKS013
-
1000+ posts
When area ___ of sprite clicked
Is this an acceptable workaround?
You can just use clones.
You can just use clones.
//first let’s make a setup for this workaround
set [Clone# v] to [0]//for this sprite only
repeat (6)
change [Clone# v] by (1)
end
when I start as a clone
switch costume to (join [Part ] (Clone#))
add [false] to [touching? v]
add [false] to [clicked? v]
repeat until <>//replaceable with a forever block
replace item (Clone#) of [touching? v] with <touching [mouse pointer v] ?>
replace item (Clone#) of [clicked? v] with <<touching [mouse pointer v] ?> and <mouse down?>>
end
//now that we’re done with the setup, we can work on the workaround for the actual block
when green flag clicked
forever
if <(item ( v) of [list v] :: list) = [true]> then
...::grey
end
end
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
No. I want it for the Is this an acceptable workaround?original sprite.
Big snip
- musicROCKS013
-
1000+ posts
When area ___ of sprite clicked
What do you mean “original sprite”? Please elaborate.No. I want it for the Is this an acceptable workaround?original sprite.
Big snip
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
Plus, you can't divide clones, not like this
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
The sprite you're clicking. duhWhat do you mean “original sprite”? Please elaborate.No. I want it for the Is this an acceptable workaround?original sprite.
Big snip
- musicROCKS013
-
1000+ posts
When area ___ of sprite clicked
Divide clones..? When I added the Plus, you can't divide clones, not like this
switch costume to (join [Part ] (Clone#))block, I was suggesting that you have to make a bunch of different costumes for this workaround.
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
Oh, hell no. This is waaaaaaaaaaaaaaaaay simpler.Divide clones..? When I added the Plus, you can't divide clones, not like thisswitch costume to (join [Part ] (Clone#))block, I was suggesting that you have to make a bunch of different costumes for this workaround.
- musicROCKS013
-
1000+ posts
When area ___ of sprite clicked
The sprite you're clicking. duhThe workaround I made uses clones. There isn’t a difference (technically).
Okay what did you mean by “it” then?
original sprite.If you’re talking about the code, this would only require one sprite. No. I want it for the
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
I want 1 block for 1 sprite. Your “workaround” is actually a pain in the butt code. I'm simplifying that.The sprite you're clicking. duhThe workaround I made uses clones. There isn’t a difference (technically).
Okay what did you mean by “it” then?original sprite.If you’re talking about the code, this would only require one sprite. No. I want it for the
- musicROCKS013
-
1000+ posts
When area ___ of sprite clicked
waaaaaaaaaaaaaaaaay simpler.Is it though? The only thing you’ve really said about connecting parts of the costume is by (?) putting text boxes with a number by them. This is
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
That's a representation. The sprite would be together with no labels, but each are is how it's labeled.waaaaaaaaaaaaaaaaay simpler.Is it though? The only thing you’ve really said about connecting parts of the costume is by (?) putting text boxes with a number by them. This is
- musicROCKS013
-
1000+ posts
When area ___ of sprite clicked
Most of the code is the setup, or the code that generates the clones and makes them update their status (clicked/not clicked) on the list. You only need to use that last bit of code at the end to detect this. I want 1 block for 1 sprite. Your “workaround” is actually a pain in the butt code. I'm simplifying that.
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
Grr I want a hat block to do that.Most of the code is the setup, or the code that generates the clones and makes them update their status (clicked/not clicked) on the list. You only need to use that last bit of code at the end to detect this. I want 1 block for 1 sprite. Your “workaround” is actually a pain in the butt code. I'm simplifying that.
- musicROCKS013
-
1000+ posts
When area ___ of sprite clicked
That's a representation. The sprite would be together with no labels, but each are is how it's labeled.
Okay, but how do you label them?
Last edited by musicROCKS013 (June 14, 2022 19:55:07)
- The-Molten-Freddy
-
500+ posts
When area ___ of sprite clicked
how do you label them?Most sprites are breakable. Those pieces are the areas. Non breakable sprites only have 1 area. Okay, but
Last edited by The-Molten-Freddy (June 14, 2022 19:57:37)
- musicROCKS013
-
1000+ posts
When area ___ of sprite clicked
But how do you know which part has what Area number? Don’t you dare tell me to refer to your mock-up, because that doesn’t explain how you got those numbers for the mock-up.how do you label them?Most sprites are breakable. Those pieces are the areas. Non breakable sprites only have 1 area. Okay, but
Last edited by musicROCKS013 (June 14, 2022 19:58:05)