Discuss Scratch
- EvilCookie36
-
Scratcher
100+ posts
Mouse touching color?
Uhh nothing to say about this…
<mouse touching color []?>
- terminator68
-
Scratcher
100+ posts
Mouse touching color?
Uhh nothing to say about this…You can find a way around that.<mouse touching color []?>
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.
- spgame05
-
Scratcher
100+ posts
Mouse touching color?
Uhh nothing to say about this…You can find a way around that.mouse touching color [#f0f]? :: sensing boolean
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.
Last edited by spgame05 (April 14, 2014 17:03:09)
- terminator68
-
Scratcher
100+ posts
Mouse touching color?
How did you make it blue?Have you tried my method?
- EvilCookie36
-
Scratcher
100+ posts
Mouse touching color?
Yes, it worked, thanks.How did you make it blue?Have you tried my method?
- 22lokek
-
New Scratcher
1 post
Mouse touching color?
Uhh nothing to say about this…You can find a way around that.<mouse touching color []?>
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.
I tried this method out, but it doesn't seem to work…
- Bright-Idea
-
Scratcher
1000+ posts
Mouse touching color?
How did you make it blue?
[scratchblocks]
<mouse touching color [] ? :: sensing>
[/scratchblocks]
<mouse touching color [] ? :: sensing >
Last edited by Bright-Idea (Dec. 11, 2016 17:39:30)
- Cub56
-
Scratcher
1000+ posts
Mouse touching color?
But if you move the mouse too fast sometimes the dot can't keep up. I've tried it sometimes and sometimes the dot moves slightly slower than the mouse.Uhh nothing to say about this…You can find a way around that.<mouse touching color []?>
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.
- WolfCat67
-
Scratcher
1000+ posts
Mouse touching color?
That's why you use the custom blocks! Sure, it may still lag behind, but if you make it “Run Without Screen Refresh” it'll move a lot faster.But if you move the mouse too fast sometimes the dot can't keep up. I've tried it sometimes and sometimes the dot moves slightly slower than the mouse.Uhh nothing to say about this…You can find a way around that.<mouse touching color []?>
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.
- kenny2scratch
-
Scratcher
500+ posts
Mouse touching color?
This doesn't work across all sprites unless you do this in that spriteUhh nothing to say about this…You can find a way around that.mouse touching color []? :: sensing boolean
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.
when green flag clickedwhich still isn't a perfect solution because you can't sense different colors
forever
set [mouse touching red v] to <touching color [#FF0000]> // of course "mouse touching red" is a global variable
end
if <(mouse touching red) = [true]> :: control //in another sprite
do this
end
mouse touching color [#ff0000] :: sensing booleanwithout making a separate variable for each color
mouse touching color [#0000ff] :: sensing boolean
mouse touching color [#ff00ff] :: sensing boolean
Therefore, I give my support.
- FreddyFazbear2137
-
Scratcher
100+ posts
Mouse touching color?
This doesn't work across all sprites unless you do this in that spriteUhh nothing to say about this…You can find a way around that.mouse touching color []? :: sensing boolean
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.when green flag clickedwhich still isn't a perfect solution because you can't sense different colors
forever
set [mouse touching red v] to <touching color [#FF0000]> // of course "mouse touching red" is a global variable
end
if <(mouse touching red) = [true]> :: control //in another sprite
do this
endmouse touching color [#ff0000] :: sensing booleanwithout making a separate variable for each color
mouse touching color [#0000ff] :: sensing boolean
mouse touching color [#ff00ff] :: sensing boolean
Therefore, I give my support.
Omg like, IT DOESN'T WORK!
- TheGreatMelon
-
Scratcher
100+ posts
Mouse touching color?
This doesn't work across all sprites unless you do this in that spriteUhh nothing to say about this…You can find a way around that.mouse touching color []? :: sensing boolean
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.when green flag clickedwhich still isn't a perfect solution because you can't sense different colors
forever
set [mouse touching red v] to <touching color [#FF0000]> // of course "mouse touching red" is a global variable
end
if <(mouse touching red) = [true]> :: control //in another sprite
do this
endmouse touching color [#ff0000] :: sensing booleanwithout making a separate variable for each color
mouse touching color [#0000ff] :: sensing boolean
mouse touching color [#ff00ff] :: sensing boolean
Therefore, I give my support.
Omg like, IT DOESN'T WORK!
I know this is kind of what I'm doing right now, but seriously please don't necropost
- DaEpikDude
-
Scratcher
1000+ posts
Mouse touching color?
(you can't necro in suggestions)This doesn't work across all sprites unless you do this in that spriteUhh nothing to say about this…You can find a way around that.mouse touching color []? :: sensing boolean
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.when green flag clickedwhich still isn't a perfect solution because you can't sense different colors
forever
set [mouse touching red v] to <touching color [#FF0000]> // of course "mouse touching red" is a global variable
end
if <(mouse touching red) = [true]> :: control //in another sprite
do this
endmouse touching color [#ff0000] :: sensing booleanwithout making a separate variable for each color
mouse touching color [#0000ff] :: sensing boolean
mouse touching color [#ff00ff] :: sensing boolean
Therefore, I give my support.
Omg like, IT DOESN'T WORK!
I know this is kind of what I'm doing right now, but seriously please don't necropost
- chexbox
-
Scratcher
100+ posts
Mouse touching color?
Hows this?
<[mouse v] touching color []?::sensing>
<[edge v] touching color []?::sensing>
<[sprite1 v] touching color []?::sensing>
- FatChicken0707
-
Scratcher
2 posts
Mouse touching color?
I dont understand. I am new to scratch, and am trying to make it so if my mouse is touching a color, then it will switch backgroundsThis doesn't work across all sprites unless you do this in that spriteUhh nothing to say about this…You can find a way around that.mouse touching color []? :: sensing boolean
First, make a sprite that is just a 1x1 black dot. Set the ghost effect to 99%, and tell it to always go to the mouse pointer. Then, just use that sprite for color detection.when green flag clickedwhich still isn't a perfect solution because you can't sense different colors
forever
set [mouse touching red v] to <touching color [#FF0000]> // of course "mouse touching red" is a global variable
end
if <(mouse touching red) = [true]> :: control //in another sprite
do this
endmouse touching color [#ff0000] :: sensing booleanwithout making a separate variable for each color
mouse touching color [#0000ff] :: sensing boolean
mouse touching color [#ff00ff] :: sensing boolean
Therefore, I give my support.
Omg like, IT DOESN'T WORK!
- ACE009
-
Scratcher
100+ posts
Mouse touching color?
The true workaround is to use a broadcast and two variables:
...
set [hex code v] to [0x221133]
broadcast [mouse touching color v] and wait
if <(mouse touching color) = [true]> then
...
end
when I receive [mouse touching color v] // 1x1 pixel sprite
go to [mouse pointer v]
set [mouse touching color v] to <touching color (hex code)>

















