How do connected objects inherit parent's move restrictions?

0 favourites
  • 6 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hello. I had this problem throughout many projects but now I can't evade it.

    When an object is attached to another object via everytickish positioning and you drag it around - everything seems fine until you restrict parent object's move area. On the GIF below you may see how square can't pass the border but connected sprites keep following cursor even though Mouse.X isn't mentioned in event sheet. Sprites go back to parent eventually (in few ticks or more) but then they go to it's "ghost" position again. I assume some engine limitations, but still hope for a solution.

    What I CANNOT do:

    • Apply pin behavior: I'm building kind of puppet rig with many parts connected and pin isn't compatible with many types of moving and rotating I'm using;
    • Restrict coordinates for each part in particular: there are reeeally lot of them and their origins aren't static.
  • Are you using drag and drop behaviour? Seems like a limitation with drag, because it is still in drag every time you move it thinks the object position is the position of the mouse cursor. A possible fix is to set the other objects to X=300 as well.

  • Drag'n'Drop is most smooth one with collisions. Tried following cursor, but there are own issues.

    Sorry for the size, forum doesn't support spoilers.

  • You set the position of the 'followers' before setting the final position of that base object.

    Should work if you switch both events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On the event for x<300 if you set all the other objects to x=300 as well as the square then it's smooth, is that what you want to happen?

  • >99Instances2Go

    Worked like magic! Can it really be that easy?


    That would solve, but every sprite has own origin and calculating relative coordinate for each is quite painful.

    Many thanks, everyone!

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