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

Get help using Construct 2

Post » Fri Jan 15, 2016 2:05 am

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 :)
B
5
Posts: 29
Reputation: 733

Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], SantasProject and 12 guests