# Get tile ID using X and Y

2 replies__1__

13.04.20 07:36:00 pm

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!

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!

fish

__1__