Get Width and Height of STI (Simple Tiled Implementation) map
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Get Width and Height of STI (Simple Tiled Implementation) map
I'm using STI by karai17 and had a quick question about how to get the width and height of a map in pixels, thanks!
- NoreoAlles
- Party member
- Posts: 130
- Joined: Mon Jan 03, 2022 5:42 pm
Re: Get Width and Height of STI (Simple Tiled Implementation) map
If you know how big each tile is, just multiply that by the width or height.
"Why do they call it oven when you of in the cold food of out hot eat the food?" - Jon Arbuckle
-
- Prole
- Posts: 4
- Joined: Fri Jun 03, 2022 11:42 am
Re: Get Width and Height of STI (Simple Tiled Implementation) map
gameMap = sti('maps/testMap.lua')
mapW = gameMap.width * gameMap.tilewidth
mapH = gameMap.height * gameMap.tileheight
mapW = gameMap.width * gameMap.tilewidth
mapH = gameMap.height * gameMap.tileheight
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 10 guests