Jmelo129 / TD-Game

Planning for the Tower Defense Game
0 stars 0 forks source link

Unique Enemy Pathfinding #8

Closed Jmelo129 closed 9 months ago

Jmelo129 commented 9 months ago

I want to add different enemies to the game and size them all differently to make it easy to tell which enemy it is.

When trying to do this though, I am getting issues with the small enemy going off of the path and am also getting random index errors.

Jmelo129 commented 9 months ago

UPDATE:

I got it working! All I needed to do was change the path system a bit and rather than having 2 different arrayX and arrayY variables, swapped to just one and based the array position off of the center of the enemy and compared it to the center of a tile to determine whether it was inside it or not.

Another issue solved lets go!!!! XD