Discuss Scratch

gdfsgdfsgdfg
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

READ THE OP BEFORE POSTING
I don’t want to use fake mouse pointers as it just breaks the functionality of a real
mouse pointer

Last edited by gdfsgdfsgdfg (Oct. 25, 2023 17:48:16)

-gr
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

Make a 2x2 sprite that is always going to the mouse pointer, then check if that's touching the color.
gdfsgdfsgdfg
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

-gr wrote:

Make a 2x2 sprite that is always going to the mouse pointer, then check if that's touching the color.
read OP it states that I don’t want to use a fake mouse pointer it
breaks the functionality of the mouse click
also it doesn’t work all of the time

Last edited by gdfsgdfsgdfg (Oct. 25, 2023 16:10:20)

gdfsgdfsgdfg
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

BigMike-Channer wrote:

Why don't you want to use it?
bruh its not related to the question
amogus1123
Scratcher
500+ posts

[READ OP] how to detect if a mouse pointer is touching a color

gdfsgdfsgdfg wrote:

I don’t want to use fake mouse pointers as it just breaks the functionality of a real
mouse pointer
https://scratch.mit.edu/projects/913934204/

I just made a fake mousepointer but hid it
gdfsgdfsgdfg
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

amogus1123 wrote:

https://scratch.mit.edu/projects/913934204/

I just made a fake mousepointer but hid it
Bro read OP
also that doesn’t work as its hidden
and
<color [#5aca56] is touching [#a03dae] ?>
won’t detect that
amogus1123
Scratcher
500+ posts

[READ OP] how to detect if a mouse pointer is touching a color

gdfsgdfsgdfg wrote:

amogus1123 wrote:

https://scratch.mit.edu/projects/913934204/

I just made a fake mousepointer but hid it
Bro read OP
also that doesn’t work as its hidden
and
<color [#5aca56] is touching [#a03dae] ?>
won’t detect that
well……….. it does

well that means they is no way to do your question, should be a suggestion…

Last edited by amogus1123 (Oct. 25, 2023 17:56:53)

CAPoftruth-alt
Scratcher
100+ posts

[READ OP] how to detect if a mouse pointer is touching a color

gdfsgdfsgdfg wrote:

amogus1123 wrote:

https://scratch.mit.edu/projects/913934204/

I just made a fake mousepointer but hid it
Bro read OP
also that doesn’t work as its hidden
and
<color [#5aca56] is touching [#a03dae] ?>
won’t detect that
If that's then you could use
set [ghost v] effect to (100)
instead. As far as I know, there isn't any other way to do so.
ajskateboarder
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

gdfsgdfsgdfg wrote:

I don’t want to use fake mouse pointers as it just breaks the functionality of a real
mouse pointer
This doesn't make sense – the demo amogus1123 linked works perfectly fine with a "set [ghost v] effect to (100)"
gdfsgdfsgdfg
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

ajskateboarder wrote:

This doesn't make sense – the demo amogus1123 linked works perfectly fine with a "set [ghost v] effect to (100)"
I tried doing that
it didn’t detect
-Valtren-
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

gdfsgdfsgdfg wrote:

ajskateboarder wrote:

This doesn't make sense – the demo amogus1123 linked works perfectly fine with a "set [ghost v] effect to (100)"
I tried doing that
it didn’t detect
Try 99 percent, that always works for me.
mybearworld
Scratcher
1000+ posts

[READ OP] how to detect if a mouse pointer is touching a color

Make an sprite that's just a single pixel, hide it via the ghost effect, and make it detect the color:
when gf clicked
forever
go to [mouse-pointer v]
set [ghost v] effect to (100)
set [mouse cursor touching green v] to <touching color [#00ff38]?>
end
Demo
(Also, this should probably be in HwS)

Powered by DjangoBB