How do I destroy tilemap?

  • Hi guys.

    Please have a look at this animation.

    Tile map is changing, and player need 2 shots to destroy tile.. I wonder is it possible to make it in Construct 2?

  • Bullet on collision with tilemap -> erase tile at (tilemap.positiontotile(bullet.x)),(tilemap.positiontotile(bullet.y))

    That should destroy the tile where the bullet hits, although it may need some tweaking to work with your project. Maybe someone else can help with the two hits thing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use an array to check how many shots has the tilemap received:

    bullet on collision with tilemap ->

    check if array(bullet.x,bullet.y) is less than 1 ->

    If it is, add 1 to position (bullet.x,bullet.y) in the array

    If it isn't, destroy tilemap at position (bullet.x,bullet.y)

    The hardest thing to do would add the automapping, which is a set of user-defined rules that change the tilemap like the gif you posted.

  • Thanks guys, that's very helpful.

    Yeah, automapping seems to be the hardest thing.

    I will let know the progress.

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