Mousclick and mouse down for same events. Wait a moment before the latter kicks in

0 favourites
  • 4 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • I have this.

    These two are identical, but one is mouse down.

    What I want it to do is let individual clicks pass, but also let pressing down mousebutton work, after a tiny while, long enough for the user to presumtive click and release mouse button for individual input? (or a tiny bit longer)

    With having both events going on, the mousedown of course kicks in at once.

    I hope I am able to explain what I want.

    For context: it is to adjust a number in gui. Pressing down button will spam and do it uncontrollable way, while single clicks is tedious if you want to adjust from let's say 0 to 60.

    Here's a pic to show what I mean.

    Thank you!!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Looks like the second pix fell away. Wasn't able to add it back in.

  • You could do a timer with a variable. Something like this. It adds 1 when you click but makes a timer 0.2 sec later. After that it will add 1 quickly. There’s probably a more refined way. Basically you could just have a timer count how long the mouse button is down.

    On sprite click
    — add one to value
    — set sprite timer to time+0.2
    
    Left mouse is down
    Mouse over sprite
    Sprite timer >time
    — add 1 to value
  • I managed to get what you meant now!

    At first I was so confused, and I had to reinpret it a bit.

    On the time I had to add a boolean to be true, and then add that boolean in the spam version.

    And mouse click end = setting boolean false.

    Hopefully it will work now!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)