Change between match and don't match
Hi! I'm trying to activate sounds in different zones on a drawing, on the screen. I already use Mousestate to recognize the move and choices of the mouse.
Actually, I need to turn on the toggle when I clic on at a precise location but I'd like the toggle to turn off if I'm not on this precise zone, even after I've already clic on the mouse.
If the mouse is at the right place, then 1; if not, then 0.
If I clic on the the mouse, then 1; if not, then 0.
If clic on the mouse at a wrong place, it should give 0.
I tried with Match. The problem is that when it's turned on, I'm not able to deactivate it only by changing the position of the mouse. I don't want a clic to be essential to have the result.
I show here where I finished this evening on that particular problem.
Thank you.
Cloud
Hi Cloud
Is this what you mean?
(clicks on mouse only activates toggle if the curser is in the lower right half on the screen and the toggle turns of if the curser is outside the area)
Morten_E
Hi Morten.
Thank you for your send. I can see an other way to construct the code.
What I'm looking for is a little bit different.
I would need the toggle to be on when I clic (ok : it works),
but to come back off just when I release the mouse.
Actually, if I want the toggle to be off, I have to clic another time...
Is it more clear?
Thank you :o)
Cloud
Something like this ?
I missed the start of the discussion, so I may have missed something...
hth,
Julien.
Hi Cloud
Like this...?
-Morten_E
Hi Julien and Morten.
I've finally find the solution with Ggate.
I send you the result of my research and your encouragments!
I combined my solution to your code, Morten.
Thank you very much.
Cloud
Ok that's what you meant. ;-)
I thought you wanted the toggle to switch off when the mouse goes out of the area.
Best
-Morten_E