GetKeyState for mouse clicks
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Sat Dec 06, 2014 4:14 pm
by Rebenely
Is there a getKeyState equivalent for mouse clicks?
I am trying to create a function that will the count number of right clicks made.
Re: GetKeyState for mouse clicks
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Sat Dec 06, 2014 5:07 pm
by Zivouhr
Here are a couple threads that might help a little:
http://game-editor.com/docs/script_reference.htmviewtopic.php?f=31&t=13052&p=93636&hilit=mouse+clicks#p93636I haven't used mouse buttons much yet while experimenting with Game Editor, so the only thing I can think of is having a hit point counter on the object the mouse is over in the screen, and each time you press the mouse, it would tally it up until the certain amount of clicks, and then do the action.
Not sure how to code that offhand or if that's exactly the goal.
Re: GetKeyState for mouse clicks
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Posted:
Sun Dec 07, 2014 3:49 pm
by lcl
There isn't a way to get mouse state the same way as GetKeyState does for keyboard.
What you would need to do, is to have an actual actor, most likely a Filled Region actor, which you would use to count the clicks.
Every time user clicks that actor, a variable holding the amount of times clicked would increase. You could resize the Filled Region to cover the whole screen so that every click would be clicked on that specific actor.