Hello there,
I'm working on an AI, pathfinding.
Now the problem that occurred to me is as follows: I check every surrounding tile around the AI and check if they are passable or not when the AI reaches the limit of the level AppGameKit will return an error because the array is out of entries.
My question: is there a way to bypass this?
this is how I do it now, but when the AI reaches a wall it will return an error.
local tileN as integer
TileN = m[ay - 1, ax]
local TileS as integer
TileS = m[ay + 1, ax]
local TileE as integer
TileE = m[ay, ax + 1]
local TileW as integer
TileW = m[ay, ax - 1]