This is a really helpful function. I’ve been meaning to ask if there was a sprite-less way to do this for awhile. Is there a way to do this with specific tile graphics instead of just tile columns amd rows?
Like a function that can tell you how close a certain tile graphic, if that makes sense. But thanks none the less, i’ll be messing around with this code
My good sir, there is a sprite-less way to make sprites! It’s all just math and more math. By “specific tile graphics” do you mean a sort of “distance to nearest tile of type” block?
You could get the “specific columns and rows” from the tiles in a “array of tiles of type” block with that little “(location) [column]” block and put them all through this function to find the one that’s closest.
Yes, that’s pretty easy to adjust. In the scene drawer there is an “array of all [insert tile] locations” This is a list of every location of a tile. It acts just like any other array. You can use this to gather information about a tile in order to make it usable with the function.