Player and Enemy collisions[PLATFORMER]

  • Hello,

    I have a player and an enemy object in my game.

    [attachment=1:3j2ek84d][/attachment:3j2ek84d]

    Player is blue and enemy is orangish. So when I collide with enemy from side without touching the floor(left side of the image) then the enemy is killed but i want player object to take hit/damage without killing the enemy. Player object only gets hit when player is touching the floor and colliding with the enemy(right side of the image). I want my player object to get hit in both of the examples. And I should be able to kill enemy when i hit it from the top like Mario games.

    Here is the code that i am using.

    [attachment=0:3j2ek84d][/attachment:3j2ek84d]

    PLEASE ASK IF YOU WANT TO KNOW ANYTHING ABOUT THE GAME. E.G. PLAYER BEHAVIOURS.

    THANKS.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • player on collision with enemy

    ---(sub event) player is falling

    ---(sub event) player y < enemy y ----- enemy destroy

    else ---- player get hit

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