How do I make top-down AI

0 favourites
  • 7 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • Hello, I am trying to make a top down adventure shooter and I am having problems with my enemy AI. What I want to happen is for the enemies to walk around in a random pattern (doing fine with that, so far) until they see the player, at which point the charge the player and attacks. I've set it up with instance variables (on the AI themselves), line of sight (which signals when the player is near), path finder(to charge the player), and 8 direction (just for the random walking). can somebody please tell me what I'm doing wrong?

  • If you can explain what is happening, what your current events are and what you expect to happen, it will be a much easier question to answer..

  • I think I figured it out, I had an instant variable set to change, between 1-4, every 3 seconds. All 4 changed the directions, but if the enemy saw the player it would change to 5, which would give it a pathfinder to the player. I had to add an every second, to the pathfinder, so they'd stay on the player.

  • place the .capx file, for i can to help you.

  • I would place it, but I'm not quite sure how to.

  • Get a dropbox account and add the file to it and get the share link and when you post it change the last number after DL=0 to DL=1

    that how im doing it oh and dropbox has a free 1gb storage for you to use so I would just make a tester capx for the problem and remove it as you get it solved

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry it took me a bit to get this back to you (hecktick holiday), but here it is, I think. I solved the problem with pathfinder but if you'd still like to see if you can make any improvements go ahead.

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