Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

AI Movement

Author: Robert Dionian

Posted: 11/24/2023

The Problem:

The problem I am having is while in the combat level the AI enemy is not moving to the player. when the player ends his turn the AI finds a path to the player and then is supposed to move towards the player. The AI not moving is a problem because the enemy will never be able to attack the player because it will never be in range.

The Solution:

I am still working on a solution, the path the enemy is supposed to take is stored in an array, I am looping through the array and passing in the location of each object along the path to a simple move to function. I am not sure why the enemy is not moving, I have verified the path is being stored and that each iteration of the loop is moving to the next index and passing the next location to the move function.

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.