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 Discussion / Select Weapons with the Mousewheel

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 11th Sep 2004 22:32 Edited at: 12th Sep 2004 05:38
Can this be done with DBC as I don't see any instructions for it anywhere? and I would have thought since most FPS'S now select weapons with the mousewheel I thought that would be vital
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 12th Sep 2004 04:54 Edited at: 12th Sep 2004 05:00
ah! you want the mousez() or mousemovez() function, it returns a value from 0 to 100 IIRC depending on its position.

Mentor.

PC1: P4 3ghz, 1gig mem, 2x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 12th Sep 2004 05:29
Oh I see and I can select weapons like that can I Mentor?
PiratSS
22
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 12th Sep 2004 06:31
yes you can

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 12th Sep 2004 07:37
just check for the value of the mousewheel, simple example follows



this just changes the value of item and displays the items name, you could use the item value to change your weapons, you would also remove the wait 100 from real code, I just put it in so that you can see the values do change in sequence, otherwise it would alter so fast it might look like the weapons where changing at random.

Mentor.

PC1: P4 3ghz, 1gig mem, 2x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 12th Sep 2004 09:38 Edited at: 12th Sep 2004 10:18
Thanks Mentor, I checked and it worked brilliantly I also take your point onboard about the timer
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 12th Sep 2004 13:51
Yes! I really wanted to use the mousewheel too for zooming in Firewall. Yeah! Thanks vampyre, for asking, and all you guys for answering.

Uh..this will work in DB Classic too, right? I will check and report back...

Xander Moser - Bolt Software - Firewall
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 12th Sep 2004 13:54
Oh, geez. It is right in the help files too...I guess I should have looked more carefully

Xander Moser - Bolt Software - Firewall
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 13th Sep 2004 02:14
Thanks Bolt at last, someone who appreciates why I ask questions

Login to post a reply

Server time is: 2025-05-24 19:03:32
Your offset time is: 2025-05-24 19:03:32