What is the logic for getting the total tile types in a tileset + tileset questions

0 favourites
  • 5 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Here's my epic tileset questions.

    -What is the logic for getting the number of tiles in a tileset?

    -How do you get a tile's image and put it somewhere else, if possible?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's my epic tileset questions.

    -What is the logic for getting the number of tiles in a tileset?

    Not currently available, besides manually counting or entering a number in a variable ahead of time. What do you need it for?

    -How do you get a tile's image and put it somewhere else, if possible?

    TileAt(x, y) expression to get the tile id at a position, Set tile action to set a tile id at a position.

  • What do you need it for?

    I'm making a level editor and I want to make it easy to pick a tile from a palette. So I'd like to show all the tiles and let you pick one.

  • In that case you don't need the number of tiles right?

    On paletteTilemap clicked - Set selectionVariable to paletteTilemap.TileAt(paletteTilemap.PositionToTileX(Mouse.X),paletteTilemap.PositionToTileY(Mouse.Y)

    On canvasTilemap clicked - Set tile at canvasTilemap.PositionToTileX(Mouse.X), canvasTilemap.PositionToTileY(Mouse.Y) to selectionVariable

  • In that case you don't need the number of tiles right?

    On paletteTilemap clicked - Set selectionVariable to paletteTilemap.TileAt(paletteTilemap.PositionToTileX(Mouse.X),paletteTilemap.PositionToTileY(Mouse.Y)

    On canvasTilemap clicked - Set tile at canvasTilemap.PositionToTileX(Mouse.X), canvasTilemap.PositionToTileY(Mouse.Y) to selectionVariable

    Thanks!

    I also didn't know that PositionToTile was a thing!

    In that case you don't need the number of tiles right?

    I was planning on adding custom tileset support in the future, so I figured it would count the number of tiles, and loop adding a new image until it was finished. I think I may want to just add it as a animation or something?

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