Pinning Objects to move-able objects

0 favourites
  • 5 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
  • Sorry for making another thread so soon!

    I've ran into another problem while creating my level: essentially I have a pushable block which I want the player to be able to climb onto. I've done this by following a few other guides, (one of which was pushing/pulling blocks, the other climbing edges), which separately work fine, but putting them together gives me some trouble.

    I have a sprite overlaying a block which acts as a platform object (though only when the player 'overlapper' sprite overlaps it), the block follows the sprite at every tick. So the player can move it left/right, works fine.

    I also have a LedgeSprite, which if the player hits 'e' when next to, will climb on top of the sprite. I have pinned these sprites to the sprite overlaying the block (one in the top left and right corners), but I notice no matter what I do the LedgeSprites won't move with the block as it should, it lags behind a fair bit (with the one on the right not moving at all). Example: giphy DOT COM /gifs/3xz2BLfSy49auTrXOw

    I've included another screenshot of my event sheet here. Again, very new, so please forgive me if it's confusing to look at/doesn't make much sense. And sorry for the very specific problems I'm having.

    If there's anything I've left out, please let me know! Thanks!

  • You probably shouldn't pin the LedgeSprite to the Sprite9 every tick. And do you have more than one Sprite9? If you have another Sprite9 the second LedgeSprite is probably being pinned to it because you're not specifying which Sprite9 to pin to. That would explain why it's not moving.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there! I should've named Sprite9 to 'shelf' huh? Sorry if it's confusing. But no, there's only one Sprite9 In the scene right now!

    EDIT: Oh, forgot to mention, the ledge sprite isn't set to every tick, that's the Movesprite (the thing that the shelf sprite follows).

  • In events 57/58 the LedgeSprite is being pinned to Sprite9 every tick as long as LedgeSprite is overlapping MoveSprite. You only want to pin it once. If the ledge sprites are always fixed to the ends of the shelf you can pin them 'on start of layout'.

    What's happening here is that the shelf moves to the right and the ledge sprite gets pinned a little further back every tick until it's no longer overlapping the MoveSprite.

  • And with that... it works! Thanks a million Ramones!

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