VerteX123's Forum Posts

  • 8 posts
  • Nevermind, I fixed it!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I finally figured it out and made it as I wanted.. almost.. There is still one bug, but I don't know why it occurs and how to fix it. It happens when I touch Red (for example) and then drag it, it seems that it isn't dragging but when I touch Green (still holding first touch),the Red one jumps to that position where I'm holding touch.

    I added the example project to attachments.

  • 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.

  • 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.

  • hmm, the game I'm making kinda loses it's point, when using tap and double tap. It would be better when object is draggable right from the moment of touch and deselects when released.

    I'm thinking that maybe it's better not to use the DragDrop behavior and make own custom drag&drop system? then I have little-bit more control over it.. or any other ideas?

  • Thanks for the example! Unfortunately it's not quite the thing I'm trying to do. I can make it so, that if 1 or less is selected, then none can be dragged, but problem is with the DragDrop. I'll try to explain..

    1). 2 different objects.

    2). If I try to drag only one of them I can't to it (that's correct and done).

    3). If I try to drag both of them (first one with touch0 and second one with touch1) only then it's possible (done).

    4). They're not pinned together, they can be dragged individually (if both of them are selected) (done).

    Problems:

    1). If the object1 is selected first and after that I select object2, then I can't drag object1 anymore because of the DragDrop what happens because at first only object1 is selected. (so I can drag both of them only when I touch both objects at the same time)

    2).If I select both objects(touch both objects at the same time) and then release only object1 (for example) and select object1 again, then object2 won't drag anymore because there was a DragDrop when I released the object1 (selected < 2 and then it drops the object)

    So I think it's not possible with DragDrop action unless there is a feature that allows automatic touch By that I mean when conditions met, then Touch.touch.

    I've also tried with "set position". But it still drags the object (maybe the drag overrides the set position action or maybe I just placed it in wrong place)

    Right now I'm out of ideas how to make it work, so I'd be very thankful if anyone finds solution

  • actually what I mean is, that I don't want them to be moving the same way, but if I hold object1 down, then I can drag other object (the first one is at the same position, but can be moved if dragged). If I don't touch the object1 or object 2 anymore, then none of them is draggable.

  • I just can't figure it out how to do this:

    I want to make two objects draggable with touch, but they should be moving only when both of them are selected, if one of them is not selected anymore, the other stops the drag also.

    I've tried the disabeling expression, but then I have to touch it again when it's enabled.

  • 8 posts