How do I make a player get smashed?

0 favourites
  • 4 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • So I'm trying to create the mechanics for a dropping block enemy.

    So far I managed to make the player get smashed if it sits on the block and get smashed against the roof, but doing the same approach I can't do it the same for the floor.

    This is an example capx of the blocks: https://www.dropbox.com/s/a9t9qr16v1uyh ... .capx?dl=0

    Basically I have a smashed function that plays an animation, player dies and restars the layout.

    Managed to make it work when smashed against the top like so:

    Player is overlapping BRICKENEMY at offset 0,1

    Player is overlapping Tilemap at offset 0,-1. - Call function Smashed

    It works "OK". The animation keeps looping and if I trigger once it won't play any animation but will restart the layout.

    Can't do the same whenever I want it smashed against the floor. It just doesn't play any animation. I guess in this case I have to call it in a different way.

    I basically need a fix for the animation looping for the "roof smashed" and I guess I need a different way to trigger the floor smashing. Any help so appreciated.

    Thank you!

  • You've posted a capx without the issue in it which is a bit strange. I'm not seeing a player or any animations.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Make on collision and within an if comparing the Y axis of the block with the Y axis of the character. If the block Y axis is smaller than the character block is then over.

    It can be improved. But this is the basis.

  • Make on collision and within an if comparing the Y axis of the block with the Y axis of the character. If the block Y axis is smaller than the character block is then over.

    It can be improved. But this is the basis.

    Thanks. I ended up taking a different approach yesterday. Works so I'm cool with it. Thanks for your help tho, appreciated!

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