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 / How do you determine when the mous buttons are in the "Up State"?

Author
Message
Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 12th Feb 2006 09:37
The title pretty much says it all. I need to determine if the mouse was clicked. If so, a sound needs to play. But I need to make sure that it dosn't play twice. So I need a way to determine if the mouse button was clicked, then released, then I need to play a sound.

I have it so when the mouse button is clicked (Left mouse button) then the sound plays. But it repeats if you hold the mouse down.
Any help would be very apreciated.
-Sunflash T. Mace

When FPSC develops enough, lets make a Redwall game!

Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 12th Feb 2006 09:53
Oops, I got it.
For those searching, here's what I did:

In my variables section I put:


And in my main loop I put:


Hope that helps someone

When FPSC develops enough, lets make a Redwall game!

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 12th Feb 2006 12:57 Edited at: 12th Feb 2006 12:59
To play sound on left mouse release:



If that's not what you're after, hopefully you'll have more of an idea on how to get your result...

Login to post a reply

Server time is: 2025-05-23 15:18:58
Your offset time is: 2025-05-23 15:18:58