Distance travel but in drag n drop behaviors?

0 favourites
  • 5 posts
From the Asset Store
Now you can drop everything in your game with sound :)
  • i try using bullet with distance travel. like every 1000 the object will be destroyed.

    but what if the behavior is Drag n drop???

    I try to drag, but the distance travel number didn't really increase. so it won't destroy. can anyone tell the solution or if there is any method?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you might have to give the object an instance variable to manually calculate the distance travelled.

    so, on Drag Start you could save the starting position, and then on Drop calculate that distance and add it to the object's variable.

  • you might have to give the object an instance variable to manually calculate the distance travelled.

    so, on Drag Start you could save the starting position, and then on Drop calculate that distance and add it to the object's variable.

    ok I try this first...

    but I don't know if this really kind of solution that I'm looking for. what I want is every time i move 1 pixel or distance, then add 1 to a variable.

  • but if you are dragging and dropping, what would stop someone from doing circles to run up the distance? or just go back and forth? The actual distance should be the starting point to the end point, without all the extra movements.

    you could do your own custom drag and drop, and calculate the distance moved every tick if you really needed to.

  • but if you are dragging and dropping, what would stop someone from doing circles to run up the distance? or just go back and forth? The actual distance should be the starting point to the end point, without all the extra movements.

    you could do your own custom drag and drop, and calculate the distance moved every tick if you really needed to.

    I'm dragging and dropping which is go back and forth. the actual distance and endpoint will change every time the object gets a new position. anyway, the problem was already solved, I just randomly try this and that and tbh I don't know how much your info helps me but in the end, it works well and I'm really grateful for what you did. ^^

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