Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » click through sprites?
- leafyfan3
-
Scratcher
6 posts
click through sprites?
using a
if <touching [mouse pointer] ?> thento make sprites bigger when you hover over them but for some reason still happens when another sprite is in the way? how do i fix
set size to (30) %
end
Last edited by leafyfan3 (April 5, 2026 13:55:46)
- awesome-llama
-
Scratcher
1000+ posts
click through sprites?
The sprite in front is in the way if it's also touching the mouse pointer. If you find that first and store it in a variable, you can then do something like this:
if <<touching (mouse pointer v) ?> and <(sprite in front is touching mouse) = [false]>> then
set size to (30) %
end
- g6g6g66g6g
-
Scratcher
100+ posts
click through sprites?
I already made this demo that's basically what awesome-llama said so I'll send it anyway. To be clear, this works because sprites and clones on the front layers run first, activating a variable that blocks later clones from being allowed to detect the mouse.
DEMO
DEMO
- leafyfan3
-
Scratcher
6 posts
click through sprites?
thanks. didn't want to share the project because its not done
Last edited by leafyfan3 (April 5, 2026 18:30:23)
- Discussion Forums
- » Help with Scripts
-
» click through sprites?