There should be a "When cursor is moved" condition in G develop

I don’t know why I can’t find an option like this in g develop. It’s a little thing but I think it would be cool.

1 Like

I agree, it would be a very time saving feature for interactive point and click games.
We could combine it with a timer to, for example, hide the mouse if it’s not used in 20 seconds.
They could also include an “invert condition” feature, so we can replace the cursor only if the mouse is not moving.

1 Like

Yes. I was trying to make an object that follows the cursor and then the camera follows the object but for some reason when this happens, when I stop moving the cursor it will still keep moving on it’s own so in this case, having an option to where it could only work when the cursor is moved would help me out significantly.

Yeah, I think it could make sense as a feature.

In the interim, if you need to do something like this, you could set up a timer and events that go:

At the beginning of the scene | Reset timer "MouseTracker"
                              | Reset timer "HideMouse"
Timer "MouseTracker" is greater than 1 seconds | Modify Global Variable "MouseOldX" to MouseX(, )
                                               | Modify Global Variable "MouseOldY" to MouseY(, )
                                               | Reset timer "MouseTracker"
Timer "HideMouse" is greater than 20 seconds |  
Global Variable "MouseHidden" = 0            |
(Subevent 1)
------The cursor X = "MouseOldX"                     | Hide the cursor
------The cursor Y = "MouseOldY"                     | Modify Global Variable "MouseHidden" = 1
(Subevent 2)
------The cursor X != "MouseOldX"                    | Hide the cursor
------The cursor Y != "MouseOldY"                    | 
                                                     | Reset timer "HideMouse"

Global Variable "MouseHidden" = 1              | Reset timer "HideMouse"
The cursor X != "MouseOldX"                    | Show the cursor
The cursor Y != "MouseOldY"                    | Modify Global Variable "MouseHidden" = 0
Trigger Once                                   |

Hmm…if you show your events, I might be able to tell you why it keeps moving.