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.

Newcomers DBPro Corner / mouse wheel input

Author
Message
TeePee
21
Years of Service
User Offline
Joined: 18th Apr 2003
Location: Australia
Posted: 19th Aug 2003 13:53 Edited at: 19th Aug 2003 14:14
im not really a newcomer but this is just a basic question so im posting here. i know how to use input from the mouse using mouseclick() but i cant work out how to use input from the mousewheel. this does not include pressing the actual mousewheel button as i can use mouseclick() for that. i need to know how to scroll the mousewheel. it would be greatly appreciated if anyone could point me in the right direction

Teepee
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 19th Aug 2003 15:10
mousez normaly (does on mine) returns the wheel as a range between 0 and 100 , cheers.

Mentor.

GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 19th Aug 2003 21:48
There are two commands that you might use...

return value=MouseZ()
return value=MouseMoveZ()

so if you want to find out if the user pushed or rolled the Mouse Weel up try something like...

If MouseMoveZ()>0 Then [Your Code]

Down Would Be...

If MouseMoveZ()<0 Then [Your Code]

And Not Moving It Would Be...

If MouseMoveZ()=0 Then [Your Code]

Well... I hope that helps...

Anyone Can Destroy...But Few Can Create...
TeePee
21
Years of Service
User Offline
Joined: 18th Apr 2003
Location: Australia
Posted: 20th Aug 2003 13:24
mousez eh?? awesome thanks fellas

TeePee
TeePee
21
Years of Service
User Offline
Joined: 18th Apr 2003
Location: Australia
Posted: 22nd Aug 2003 15:17
ok well ive kinda hit a brick wall here. i tried implementing mousemovez() into my code but it wouldnt work properly. Whenever i have a lot of trouble with code i take out the bit thats troubling me and modify it a bit in a seperate project until i get it working then put it back in my original project. so i basically did that here and came up with the following code.

im realy stuck with this stuff. what happens when i run it is that it only seems to detect the first if condition, if mousemovez()<0, and not the second one, if mousemovez()>0. i know this for certain because if i switch the ifs around it still detects the first one only.i also tried replacing mousemovez with mousemovex and that has the same effect. ive been looking over my code and i think the only thing that could be the problem is that im not totally certain about how to use the mousemove command properly. maybe theres something i dont know about the command?

help would be appreciated again

TeePee
TeePee
21
Years of Service
User Offline
Joined: 18th Apr 2003
Location: Australia
Posted: 23rd Aug 2003 03:45
anyone?
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 23rd Aug 2003 10:37
done it! i think theres a bug or something where using mousemovez() more than once results in it all ways equalling 0 or something but anyway this works


hope it helps!!


TeePee
21
Years of Service
User Offline
Joined: 18th Apr 2003
Location: Australia
Posted: 23rd Aug 2003 13:40
yea i worked that out as well. i think whats happening is that when you do anything that involves mousemovez() or, come to think of it, mousemovex() or mousemovey(), that value resets to zero. so in the snippet i posted, the first if condition set mousemovez to 0 after it was checked.

Login to post a reply

Server time is: 2024-11-25 05:01:02
Your offset time is: 2024-11-25 05:01:02