How do I track how tall/wide a tilemap is?

0 favourites
  • 1 posts
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • Hi all!

    I am trying to write a script that loops through all the tiles across the x and y axis , attempting to find a particular tile, and I'm trying to make this script reusable for multiple tilemaps. The way I had approached it was by making a for loop where the start index is 0 and the end index is the width of the tilemap/32 (ending with a result that steps through each tile one by one), then creating a local variable that increments with each loop. While this works, I suppose it also means that when drawing the tile maps, I have to be very precise about the size, which is a bit of a tall order for the particular project I'm on as that would mean going back and tweaking the width and height of a lot of preexisting tilemaps. I was wondering if there was a simpler solution to do this involving some sort of attribute that already does this for me?

    Thanks all

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)