Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / MOVEMOUSEY() problem

Author
Message
jetbaby_2000
15
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 13th May 2011 08:59
I need a program to move an object 5 pixels based on if the mouse if moved up or down. I tried the following:

but it will only move my object up the matrix.

So how do I tell if the mouse if moving up or down? Is it a negative number if it moves down, or what? I'm totally lost
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 13th May 2011 09:44
When you read the value from mousemovey(), it resets to 0.0 - so store the mousemovey() value in a variable then check that, and it should work fine...



Health, Ammo, and bacon and eggs!
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th May 2011 20:59
Oh yes, that "feature" that lost me hours when I upgrade MagicWorld.


jetbaby_2000
15
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 14th May 2011 05:01
thanks so much!

Login to post a reply

Server time is: 2026-07-10 19:49:34
Your offset time is: 2026-07-10 19:49:34