Computer Science Canada fast score counter |
Author: | msimard8 [ Mon Oct 10, 2005 5:07 pm ] | ||
Post subject: | fast score counter | ||
Ok how do I restrict the score counter to 10 points a click. |
Author: | [Gandalf] [ Mon Oct 10, 2005 5:25 pm ] | ||
Post subject: | |||
You can change clickTime to anything you want, it matters on how long you think a click lasts before another click can be made. The wait time (clickTime) is in milliseconds.
|
Author: | Tony [ Mon Oct 10, 2005 6:42 pm ] |
Post subject: | |
the mouse button could still be held down and the score would count after every interval. you should monitor for mouse release instead. User presses mouse down -- mc = 1. User releases the mouse -- mc = 0. That's when the score counts. |
Author: | Token [ Mon Oct 10, 2005 8:09 pm ] | ||
Post subject: | |||
TADA!
probibly not the most efficient way to do it, but it works. and it gives you an idea |
Author: | [Gandalf] [ Mon Oct 10, 2005 8:36 pm ] | ||
Post subject: | |||
No... that wouldn't work at all... That loop messes up a lot, and limits you from doing a lot - efficiency has little to do with it.
|
Author: | TokenHerbz [ Mon Oct 10, 2005 11:28 pm ] | ||||
Post subject: | |||||
If you want it to be able to click and hold, for the score to go sky hi, Modify "Gandalfs" code
and put in...
******* I just mentioned that cause you said somthing about a *fast* counter...?? |
Author: | [Gandalf] [ Mon Oct 10, 2005 11:30 pm ] |
Post subject: | |
Then you would also have to keep in mind that that 'else' would include if the right or middle mouse button are pressed, so that would be a way of "cheating". |
Author: | TokenHerbz [ Mon Oct 10, 2005 11:45 pm ] |
Post subject: | |
eh, really?? button = 1 is left click, 0 = no click whats right, and middle click? |
Author: | Tony [ Tue Oct 11, 2005 7:30 am ] | ||
Post subject: | |||
tokenherbz wrote: whats right, and middle click?
middle = 10 right = 100 but you have to
|