How do I make a specific tile kills the player?

0 favourites
  • 3 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • sorry my bad english

    hi guys, i'm begginer in construct, i'm making a top-down game and I'm using tiles to make the map (something like pokemon) i want to make the lava tile kills the player when collision with him, but i have no idea how to make a event identify that specific tile on my tilemap

    thanks in advice

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For example, if you have a lava tile at index 5 in your tilemap:

    Tilemap Compare tile at X=(Tilemap.PositionToTileX(Player.x), Y=(Tilemap.PositionToTileY(Player.y)) EQUALS 5
    ...... Player subtract 1 from health
    
  • Another way to do this is to create a sprite and call it "KillTile" (or whatever you want) then set its properties to invisible. When it is set to invisible, it doesn't render in game (i.e. no one can see it) but it still acts like an object all the same with collision events and what not.

    Drag the tile on the places on the tile map that are supposed to kill the player. Then add a Payer Event > On Collision With Another Object > KillTile

    Then do your killing in the action.

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