Discuss Scratch
- Discussion Forums
- » Suggestions
- » Click transparency block
- RocketDesign_
- Scratcher
100+ posts
Click transparency block
set click transparency [on v] :: sensing // This block allows you to be able to click through a certain sprite.
set click transparency [off v] :: sensing // This block doesn't allow you to be able to click through a certain sprite.
Last edited by RocketDesign_ (Jan. 7, 2024 21:54:07)
Last edited by RocketDesign_ (Tomorrow 00:00:00)
- 123m83
- Scratcher
100+ posts
Click transparency block
Elaborate, what do you mean by “clicking through a sprite?”
13yo Scratcher who mainly goes on QaS, Suggestions, and occasionally Bugs and Glitches.
Useful links:
Ocular (search for dupes)
List Of Rejected Suggestions
VERY COOL WEBSITE
- RocketDesign_
- Scratcher
100+ posts
Click transparency block
So, for example, if you had a sprite in front of the sprite you wanted to click, you would set the click transparency to “on” (Like if you had an escape room game) Elaborate, what do you mean by “clicking through a sprite?”
when green flag clicked
set click transparency [on v] :: sensing
Last edited by RocketDesign_ (Jan. 7, 2024 22:01:37)
Last edited by RocketDesign_ (Tomorrow 00:00:00)
- PhiPhenomenon
- Scratcher
500+ posts
Click transparency block
I'm pretty sure this already exists in Scratch. In the GIF below, I test click transparency. True means that the mouse is currently clicking it, while false means that it isn't.
As you can see, I can click the purple rectangle through the red one. If you would like to turn click transparency off, then add an extra condition to check if the mouse is on the top sprite. If it is, then set the bottom sprite's clicking status to false.
As you can see, I can click the purple rectangle through the red one. If you would like to turn click transparency off, then add an extra condition to check if the mouse is on the top sprite. If it is, then set the bottom sprite's clicking status to false.
- Discussion Forums
- » Suggestions
- » Click transparency block