Platformer - Prevent player from getting stuck inside tilemap

0 favourites
  • 4 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I'm working on a section where tiles for the player to run on are created mid-stage. It works fine unless a tile is created where the player is already standing - then they get stuck. How would I prevent this or push the player out of the area?

    (playerCol is using Platform behavior, objects are a Tilemap with Solid behavior)

    Tagged:

  • From my side I would design the game so it's impossible to get stuck, so the path is always ahead of the player. Getting stuck I would consider a bug more than trying to work out how to fix it if it happens to a player during the game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My short-term solution is doing an 'is Overlapping PlayerCol' after the tile is drawn and getting rid of it if it is, it's not super elegant but it means the player is never stuck in the boxes

  • First of all, what a beautiful character art and animation, super alive and expressive. 11/10.

    Secondly, you have the option in the behavior "Custom" to eject from solids, but personally I always find it more visually appealing making my own ejection feature, mainly using "Tween" for a more delicate effect, rather than just snapping out of it.

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