Making a Thwomp like enemy.

  • Recently, I've been trying to add new enemy types to my game. If it wasn't obvious through the title, it is a platformer. One of the enemy types I'm going for is a mariowiki.com/thwomp.

    I've been using compare x to make them. But they glitch sometimes. I also want them to only hurt the player if they fall directly on the player. Can I get some help please?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been using compare x to make them. But they glitch sometimes.

    You will need to elaborate. What is your problem?

    As for falling directly on the player... that would be a set of conditions, up to you to decide what is most suitable.

    For example...

    Thwomp On collision with Player

    Thwomp is falling/moving

    Player is within Thwomp.width/2 of Thwomp x position

    Then do damage

    Else (custom movement) Thwomp push player out at angle

  • > I've been using compare x to make them. But they glitch sometimes.

    >

    You will need to elaborate. What is your problem?

    As for falling directly on the player... that would be a set of conditions, up to you to decide what is most suitable.

    For example...

    Thwomp On collision with Player

    Thwomp is falling/moving

    Player is within Thwomp.width/2 of Thwomp x position

    Then do damage

    Else (custom movement) Thwomp push player out at angle

    X as in, to compare if the players position on the x axis is close to the enemies x.

  • Yes, basically if your player x position is within the Thwomps width (assuming the origin point is in the middle of both).

    Then you'll need to tweak it as you see fit. Does the player need to be completely under the thwomp? What happens on a partial squish? Or if they player moves into the side of it while it is falling? ect.

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