Forum

> > CS2D > Scripts > Get tile ID using X and Y
Forums overviewCS2D overview Scripts overviewLog in to reply

English Get tile ID using X and Y

2 replies
To the start Previous 1 Next To the start

old Get tile ID using X and Y

Mami Tomoe
User Off Offline

Quote
I have a tile set that is a 5 x 51 tiles (which means 5 tiles per line)

I also have X and Y that I want to use to find the tile in the appropriate location on the tile set.

That means X:0 Y:0 will give me tile #1 and X:1 Y:0 will give me tile #2, and so on.

What is the most efficient way to do this? I remember doing this in the past but I'm unsure if it worked and I'm fairly certain it wasn't in Lua.

Help would be appreciated, you will be credited in my project.

Thanks!
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview