Changing DragDrop Button

0 favourites
  • 5 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • I'm afraid I already know the answer to this question, but I thought I'd ask just in case.

    Is it possible to change the button that triggers the DragDrop behavior? I've scoured the mouse, system, and behavior events (not to mention the forums), but I can't find a thing.

    I know it's possible to piece together your own drag-and-drop functions without the behavior, but I'd hate to have to go through all the trouble if I didn't have to.

  • Doesnt look like it, but that being said I thought I would save you some trouble.

    Try this.

    db.tt/2YDbSy3w

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the quick response, Genki! That's what I love about you guys in the community! That, and your snappy fashion sense.

    That's actually what I have running right now. The only problem with it right now is when gripping smaller objects, and sometimes the larger ones, the player will lose control of the object if they move the mouse too fast. (Though, I think it might be a problem with where I placed the origin points)

    Eventually, I want to add the ability to pick up and throw objects, and moving the mouse quick enough to throw objects far enough might be a problem.

  • Haha no worries, thanks for the laugh :)

    I see what you mean with the prev example, here is something a little more robust. Instead of making sure the cursor is over the object we are moving, we can set a variable to turn on and set the position of the object based off that.

    db.tt/xFkRF5PC

  • That did the trick! Runs pretty smooth. Thanks again. I probably would've snapped my desk in half with my forehead without your help.

    Now all I need to do is measure mouse velocity, and people will be hurling boxes at each other like champs!

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