How do I add a wait time for Dragging

  • What should I do to allow and start dragging an object if its held for a second or so. I can enable the drag after 1 second but it doesn't pick it up until the next tap.

  • Firstly you should add Touch event (is touching object) and then you add new action: system -> Wait -> 1 and after that you add action what enables the drag.

  • Firstly you should add Touch event (is touching object) and then you should add new condition system -> Wait -> 1 and after that you add action what enables the drag.

    I want to pick it up not enable it

    on hold object > Wait 1 sec > Pick it up

    what you're saying will require the user to touch it once to enable it and again to drag it.

  • oh yes, sorry, I misread. Actually I have almost the same problem myself:

    But haven't found solution to it.

    In C2 there could be actions for automatic input, I'm not sure if it's possible to do.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • C91Designs VerteX123

    I've attached a commented capx that should do what you want. The key was to have Drag enabled always, but not actually allow movement until a variable was set after a timer.

    You have to touch (or mouse left-click-hold) the sprite for one second before it will drag.

    If you try to drag it before then it will just stay in the same spot.

    If you drag off the sprite before the timer runs to allow drag, it will drop and you have to re-touch again if you want to drag.

    Edit: Changed capx so the sprite changes colour - red = can't drag, orange = getting ready to drag, green = can drag

  • Thanks a lot!

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