How do I make enemies 'impassable' without solid behavior?

0 favourites
  • 2 posts
From the Asset Store
In this template the music plays without looping in your game
  • Working on a karate platformer, think Kung Fu Master where multiple enemies are approaching the player from both sides.

    I want the enemies to block me from moving past them. I tried implementing this by adding solid behavior to both player and enemy objects, but this caused multiple enemies to 'stack up' behind each other, with the closest to the player essentially blocking the enemies behind them from attacking. If I add solid behavior just to the player, the player pushes all the enemies around. I like how things are working without the solid behavior, but I want to add the logic to prevent the player from moving past an enemy.

    I have to think this has been implemented many times in the past, can someone offer guidance on what has worked well before I cobble up a sub-par solution of my own?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can try to slightly push the player back when it collides or overlaps with the enemy. Use "Set vector X" action and apply vector in the opposite direction from the enemy.

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