tap but don't drag

0 favourites
  • 4 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hello, How do I?

    1. when object is tapped, do one action

    2. when object is dragged, do a different action.

    However I don't want both actions to occur at the same time. If the object is tapped, then it should not start to drag as this has a full set of actions to start the drag.

    I tried a variation of events and sequences but couldn't get it to work.

    Is there a way for the conditions to handle this?


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you need to store the tap gesture on a variable like value 0

    and when tap gesture happens turn that value to 1 lets say.

    and on the drag&drop thing add if variable is 0 drag enable.

    if 1 disable drag&drop

    tap gesture needs to happen in a sequence for this to work like click/release at a certain speed. it might work weird though on PC. but mobile should work properly.

    you also need another condition for tap to check if drag&drop is enable ... so the rotation to 90 degrees doesn't happen.. once you finish drag&drop.

  • Thanks GeorgeZaharia

    I would like it to work on desktop also, i.e. with mouse drag and click.

    I tried this and variations of it but still no luck. Doesnt seem to register the conditions sequentially. Any ideas?

  • If anyone else has this problem in the future, I ended up putting another invisible object where it was located. So if touching invisible object it will rotate and always return back to its starting point, if its not overlapping invisible object, it will drag as normal and all actions that follow during drag.

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