Detect Full Mouse Clicks?

Hey there! So I am wondering how I can have GS detect a full down-up mouse click? Currently I have my project detecting when the mouse button is down DO event. The problem with this is that I can hold down the mouse button and keep initiating the event.

I'd like the event to only initiate once per click.

Thank you! And I apologize if the answer is super simple, I just can't seem to figure it out.

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Try setting a boolean to true when pressed and false when released. Then put that boolean on your rule so that it will only work when it's false, which will be once.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Couldn't you just use "mouse button is up" then it will only trigger when the button is released, after a full click down and release?
  • SocksSocks London, UK.Member Posts: 12,822
    Couldn't you just use "mouse button is up" then it will only trigger when the button is released, after a full click down and release?
    Too easy, needs more attributes.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Oh yeah, I forgot, humans love to over complicate things. Silly me! :)
  • Geta-VeGeta-Ve Member Posts: 18
    @KevinCross: Thank you! I shall try that out. :)

    @jaime_c and Socks: unfortunately this does not work since after the first click it always registers the mouse up event. Thank you though! :)
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    The other way if you don't want to set up a release rule is have a timer inside the pressed rule that sets the boolean back to false after 0.3 or 0.4 seconds etc. I sometimes use timers in this way for things like double tap. Make sure the run to completion box is checked.
  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    ...
  • SocksSocks London, UK.Member Posts: 12,822
    @KevinCross: Thank you! I shall try that out. :)

    @jaime_c and Socks: unfortunately this does not work since after the first click it always registers the mouse up event. Thank you though! :)
    @Geta-Ve

    Works fine for me (example attached), the point here is that if you can use Kevin's notion of "when released" to change an attribute, then you already have a system for detecting when a full click is made ! (the very "when released" you are using to change the attribute!!).
  • Geta-VeGeta-Ve Member Posts: 18
    I just want to say thanks @Socks for the awesome posts! I haven't had a chance to test out your attachment yet, as I have been struggling with some other issues.

    I apologize for not responding sooner!
Sign In or Register to comment.