playMaker

Author Topic: Mouse Button hold down  (Read 3297 times)

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Mouse Button hold down
« on: April 18, 2015, 03:53:51 AM »
Is there a way to check if a mouse button is held down ? I tried to loop "Get Mouse Button Down" and store the result in a boolean but it is not working (the boolean is changing to true only for for a bit, then even if I hold it remains on false). Is there a solution ?

TheBadFeeling

  • Junior Playmaker
  • **
  • Posts: 66
Re: Mouse Button hold down
« Reply #1 on: April 18, 2015, 08:24:52 AM »
Use Get Mouse Button Down to see when it is pressed and have it switch to another state. There you can use Get Mouse Button Up to tell you when the button is let go again. Until then, the button must be down.

If you just want to check if it's down at the moment, use Get Mouse Button.

/Bad
The Force is with you, young Playmaker – but you are not a C# senpai yet.

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Re: Mouse Button hold down
« Reply #2 on: April 18, 2015, 11:17:32 AM »
It works. Thank you very much for your help :)