How do I Make a enemy Ai for a rpg 8 Direction

Get help using Construct 2

Post » Mon Oct 05, 2015 12:12 am

Im making a top down view Rpg ( not Platform) and i cant figure out a way to make a Ai that will attack me if i get close enough to it. and if im not close to it than in runs its coarse
B
3
Posts: 2
Reputation: 179

Post » Mon Oct 05, 2015 1:12 am

There are several ways to do AI for top down games, but it seems most of the time using things like pathfinder adds a whole new level of complexity and bugginess to the game. Namely, pathfinder doesn't care about solids. If it's moving along a path and that path has just become nonviable, it will still get to it's target location. I've considered a slightly more manual approach using an array for lost positions, but that seems a little intensive.
The idea looks a little like this:
Image
But for a static world game where nothing ever, ever changes state, pathfinder is probably the easiest option.

Oops, I think I just answered the wrong question. In terms of telling the AI whether to target you or not, line of sight is quite useful. In terms of roaming around, I have tried using instance variables for the AI to center around, and then it's moderately easy to just pick a position that is not overlapping solids/has line of sight in a random area around the AI.
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Thu Oct 22, 2015 9:44 pm

Thank you that help
:D
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: uzumiapps and 27 guests