so, i'm working on a game, and i want there to be an AI bot if there is no second player. the problem is, i can't get the pathfinding to work properly.
the game is fairly simple. there are two players who try to gather the most coins. i scripted it so that if there was no player two, the pathfinding ability would kick in. the bot would find the coin's x and y, and then follow it. the bot has both the platformer and pathfinding behaviour.
here is my problem:
once the bot gets the coin, he just sits there. so i push him off the ledge, and he respawns, but instead of finding the coin closest to him, he runs over to the space where the previous coin was. and he doesn't even jump. he just keeps falling through a hole i put there. i made the bot recognize the floor as an obstacle, along with a small node to indicate that there is a hole, and he still falls in.
what i want:
-i want the ai to continuously refresh it's pathfinding to that once it's gotten a coin, it moves on to a different one
-i want him to recognize hazards, and to avoid them.
please don't link me to any tutorials that don't really focus on my problem. thanks :D
<img src="http://i76.servimg.com/u/f76/13/29/41/32/untitl11.jpg" border="0" />