NEED HELP: player crushed between blocks

0 favourites
  • 6 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • guys please help:

    how do i use collision detection to kill the player if he gets trapped between two blocks...and only if trapped between them.

    in another works, if player is jumping and a block hits him from the top, the block wont kill him but move him down, if the player doesnt get out of the way and eventually there's no where to go (ie., the player has gotten trapped between the falling block and the one stationary block underneath him), then and only then he dies.

    please help, i am making a platform game with falling bolders and want to get this to work but it doesnt

  • Check the distance between the blocks is less than the player height (between the bottom edge of the top block and top edge of the bottom block. Could use 'is overlapping at offset' or something). Just one of a bazillion ways

  • can you pleaseeeeee give a capx example, if its not too much trouble...not sure how to check for offsets between to two blocks and the player

  • Like codah said there are many different ways and they really depend on the type of game. One way would be to use some sprites as detectors.

    Attached is a way to make thwomps like in mario.

  • great thanks...that's exactly what i needed. only one last question: why add the "control" object and the "sprite 2" and then pin them to each other. why not just have the "sprite 2"?

    thanks again for your help, the capx was what i needed...only cannot understand the need for the 2 objects and pinning them to each other

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's a simple enough capx, change it to one object and see what happens.

    The control object acts as a shield so you can run up against the sides of the crushers with out dying. As one object It's just: if player overlaps crusher then die.

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