How do I Work with Z-Order and Tilemap

0 favourites
  • 5 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • I'm willing to create Z-order mechanic in order to create an ilusion of deph (Passing in front and behind regarding to object's Y and the player's Y). Actually I already did using sprites, but then the fps started to drop to 40 and now I'm back again to tilemaps fully, so I can almost guarantee a steady 60fps game. Are there any way to do it using tilemaps? I've already looked and there aren't an expression to get the tile's Y. So are there any other way to achieve it?

    Thanks.

  • I've already looked and there aren't an expression to get the tile's Y

    Did you look in the manual?

    Tile positions

    When using tiles in the object's conditions, actions and expressions, positions are generally given in tiles instead of layout co-ordinates. You can convert between tile positions and layout co-ordinates using the PositionToTileX/Y and TileToPositionX/Y expressions.

  • > I've already looked and there aren't an expression to get the tile's Y

    >

    Did you look in the manual?

    Tile positions

    When using tiles in the object's conditions, actions and expressions, positions are generally given in tiles instead of layout co-ordinates. You can convert between tile positions and layout co-ordinates using the PositionToTileX/Y and TileToPositionX/Y expressions.

    Yes, and the expression is TilemapSolids.TileToPositionY(TileY), in my case.

    But what about the "(TileY)"? This is exactly what I want to retrieve.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • TilemapSolids.TileToPositionY(0) , will give you the y-position of the top row of tiles

    TilemapSolids.TileToPositionY(1) , will give you the y-position of the first row of the top.

    etcetera..

  • TilemapSolids.TileToPositionY(0) , will give you the y-position of the top row of tiles

    TilemapSolids.TileToPositionY(1) , will give you the y-position of the first row of the top.

    etcetera..

    Now I get it. Thank you very much.

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