AI 360 movement

0 favourites
  • 2 posts
From the Asset Store
JPEG format 364x HD backgrounds in 2688 x 1536 Resolution
  • Ok guys,

    this is probably going to be pretty hard. I have this:

    https://dl.dropbox.com/u/97534866/ai.capx

    where enemies can move whatever way they want (360). What I have is that if distance between player and enemy is smaller then 400 than enemy starts to move in player's direction.

    The problem is that there is wall and enemy goes straight to the wall of course and get stuck there :). I need to make it smarter to beeing able to walk around the wall smoothly. Whats the best way for this?

    If I had only 4 way movement (up,down,left,right) then I know how I would probably do that. I could have variable which would store direction of enemy moving. Then from that I would be able to know from what direction enemy hit the wall and I could send it down for example or up whatever. Or I could have home some invisible direction sprites. But I feel in this case there must be something better.

    What do you think?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'd do it by way points, placing objects in between the player and the enemy and making him walk to those points 1 by one.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)