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 / mouseclick()

Author
Message
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 26th Jul 2006 22:42 Edited at: 26th Jul 2006 23:02
I am having problems with the mouseclick command.

whenever I click something it does it twice.

Just like the problem Stupot is/was having.

I have read that thread and tried out the


but it did not work for me.

Here a section of my code to work with:


My project is a database that stores someones name,rank,chips(money),and their income (which is based on their rank)

The problem I am having is that when you click on the upgrade button and you have sufficient chips(money) if upgrades you, but then gives the insufficient funds error because it clicked the button teice because you cant let off fast enough, it is slmost humanly impossible to click the button fast enough for it to only happen once.

Hope I explained it good enough!

Cap'n


EDIT: Well i sorta fixed it by using the 'wait' command now I just have it wait 100 millaseconds or whatever.

I would still like to know how to set flags as currently stated by Izzy as it seems a more logical solution to the problem.


Cheers,
Capt. America
Stupot
18
Years of Service
User Offline
Joined: 13th Jul 2006
Location: East Sussex
Posted: 26th Jul 2006 23:27
Hey Captain. I couldn't get the 'Flag' commands to work either. I tried swapping the values about and fiddling about with it a bit but I still had the same problem.

I have solved it though...

Because each mouseclick in my game tells it to GOTO another screen I simply put WAIT 500 At the beginning of every new screen, so that when it goes to a new screen it has to wait half a second before it can perform the next action... It still carries on if you hold the mouse in for over half a second but at least you can get a good click out of it without it messing about.

In the case of your programme you may only need to do this once. If you put WAIT 500 at the beginning of the part of your script marked editmembermenu: then when a button is clicked and it goes back to this screen with the new information, it has to wait half a second before it the user can click it again...

It might not be the most efficient way of solving the problem but it works. and it'll do for me until I can figure out a better way.

Let me know how you get on.

-Stu
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 26th Jul 2006 23:32
Ya thats how I solved it before, but I just thought that their would be another way of solving it.

Thanks!

Cap'n


Cheers,
Capt. America
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 29th Jul 2006 11:31 Edited at: 29th Jul 2006 11:32
Just put...






after all of your mouseclicks.

WARNING....this idea halts the program..so cannot be used during gameplay.

Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 31st Jul 2006 02:22
ok ill try that


Cheers,
Capt. America

Login to post a reply

Server time is: 2025-05-25 06:25:17
Your offset time is: 2025-05-25 06:25:17