Platformer enemy AI?

Get help using Construct 2

Post » Sat Apr 20, 2013 4:15 pm

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

B
7
S
2
Posts: 48
Reputation: 888

Post » Sat Aug 17, 2013 5:47 pm

can you post a .capx to help you
B
24
S
6
G
2
Posts: 213
Reputation: 2,688


Return to How do I....?

Who is online

Users browsing this forum: jeffige, TheHat, Yahoo [Bot] and 1 guest