I found where is the problem with the AI


So I found where and when it happens but not why and how to solve it.

But first I need to explain how the NPC moves.

The moving is made out of 4 variables: x, y, dotx, doty. x and y say the square  where the NPC is, relative to the 500 by 500 map. (ex: [51, 279]). dotx and doxy are concentrated to a single block. As an example, let's say that NPC: trg1 (Triangle 1) has x = 122, y = 342. Now, in that block there are dotx and doty that say where on the block is the NPC and they range from 0 to 100 (percentage) and when they reach 100 they go to 0 and when they reach -10 they go 90.

So now that you know how the coordinates work, I shall tell you where and when it bugs out. when the percentage thing goes from 100 to 0 or from -10 to 90.

I don't have any Idea why this happens cause when I manually enter a destination it works just fine.

Get CTS

Leave a comment

Log in with itch.io to leave a comment.