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.

Dark GDK / dbMouseMoveZ() question

Author
Message
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 27th Jul 2009 23:50 Edited at: 27th Jul 2009 23:51
Hi! I want to give the player the option of viewing their character up close to see what it has equipped (it's an RPG). I want to do this by scrolling the middle mouse button down and up. Scrolling up brings the camera close to the character and scrolling down brings the camera to it's usual place (high up like Diablo 3). Now I have the getting close part by using:

and it works, but I don't know how to do the mouse scrolling down. I read that dbMouseMoveZ ( ) returns the difference of the last move. But I just don't know how to get this to work. Any help is greatly appreciated!

Use Google first... it's not rocket surgery!
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 28th Jul 2009 00:21
dbMoveCamera(dbMouseMoveZ()/3);

mess around with the /3 bit to find a good value for your scale and game


Your signature has been erased by a mod
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 28th Jul 2009 00:33
Sorry I don't think I explained my problem correctly. What I'm doing is using dbSetCameraToFollow to make the camera view the object when the player scrolls up. But what I don't know is how to check if the player scrolls down on the mouse scroller.

Use Google first... it's not rocket surgery!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 28th Jul 2009 01:52
MouseMoveZ will increase or decrease depending on the way the wheel moves. You can also use dbMouseZ i think to check against the move value. MouseMoveZ will only return the value that the mouse has moved since the last call. dbMouseZ keeps track if its actual position.

If it ain't broke.... DONT FIX IT !!!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 28th Jul 2009 02:02
Sweet I got that working now, thanks!

Use Google first... it's not rocket surgery!

Login to post a reply

Server time is: 2024-10-01 08:50:00
Your offset time is: 2024-10-01 08:50:00