Pin to object Bug

0 favourites
  • 7 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • Problem Description

    Object won't pin to another object.

    Attach a Capx

    [attachment=0:25l0adz3][/attachment:25l0adz3]

    Description of Capx

    The capx has two objects that you can drag into containers with slots.

    Steps to Reproduce Bug

    • Drag the right object onto a slot in the left container.
    • Drag that container around. Observed Result The object doesn't get pinned to the slot. It incorrectly gets pinned to the other slot object in the other container. I have it so that the uid of the slot gets displayed in a Text object, you can see the corrent UID get shown, but in the debug, the incorrect UID is used somehow (see the pinned object property in debug) !? Expected Result It should get pinned to the slot in the left Container and move with it. Affected Browsers
      • Chrome: (YES)
      • FireFox: (YES)
      • Internet Explorer: (YES)

    Operating System and Service Pack

    win vista sp 2

    Construct 2 Version ID

    r193

  • Here's a simpler capx that isolates the issue..

    [attachment=0:pfnjuekh][/attachment:pfnjuekh]

    Drag the brown object to the other blue object to pin it.. It displays correct UID, but it gets pinned to the incorrect object.

    It appears as if it isn't taking into account the relation of the containers (sprite3 should be picked with the sprite2 that family1 collides with).

    from the manual:

    "If a condition picks one object in a container, every other associated object in its container is also picked."

    But it's not pinning it to the picked object.

  • I can't see any problem in PinBug2.capx, it seems to be working fine - whichever way round I do it it pins to the group it touched. Am I doing something wrong?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley , have you tried dragging one to the other object, and not just the one it is next to? One should be able to pin to both, not just the one it is next to. Then drag the blue objects to move with the pin attached.

    For me, one only gets pinned to the object is spawns next to, but it should pin to any of them.

  • Ashley , here's a gif showing the problem.

    I drag the object over to the other and it doesn't attach like it should, then I drag the other object to the same object and it does.

  • It doesn't appear to be to do with families, since if you replace Family1 in the events with Sprite then it works the same. There is a fundamental conflict in the events here: Sprite, Sprite2 and Sprite3 are all in a container, so will always pick together. If Sprite collides with a Sprite2 from a different container, as per the normal working of events, both instances involved in the collision are picked, and therefore due to containers all six objects are picked. Now your "Pin to Sprite3" action is ambiguous, since there are two Sprite3 instances picked, so it's going to (arbitrarily) go with one of them.

    I don't see evidence of a bug here. I think you just want to avoid using containers, since in this example they seem to be working against you.

  • Using containers the way I have is necessary.

    I had found a workaround to this. Placing sprite3 into its own family, and then picking that family based upon the uid from the collision works. It then gets pinned to the correct object.

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