Jump to content

Checking if the mouse moved?

Recommended Posts

Currently, I'm using two Mousegetpos() 's, then doing this:

If mousegetpos()1 not = mousegetpos()2 then BARRELROLL()

But this doesn't work. I didn't expect it to at all.

I put one of them into a while 1 = 1 loop, so one is constantly changing, and the other is read once, but this does not work because (I would think) When it goes over the If then statement, it checks (updates) them both, so they're both the same again.

I thought about throwing the first coordinate into a .INI that will delete itself, so it reads from there and doesn't change, but I don't want to do that.

All I need is the Original mouse coordinate to check with the current mouse coordinate, and if theres a difference, do the function I specify.

I'm in need of halp, even though this is probably a very simple problem to fix. I just can't figure out a way to do it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...