How do I create an AI enemy that shoots at the player

0 favourites
  • 5 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • How do I create an AI enemy that shoots at the player (its a top down shooter)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • the enemy also has to follow the player

  • Pull up the templates: top down shooter, line of sight, and pathfinding.

    Those 3 cover everything you're looking to do.

  • Pull up the templates: top down shooter, line of sight, and pathfinding.

    Those 3 cover everything you're looking to do.

    but what would i do with those

  • Line of sight would allow your enemy ai to acquire it's target (your player). Pathfinding could be used to have ai move towards the player (which you could update occasionally to see if the player or any obstacles have moved). Then once the player and ai are within your specified fire distance have the ai shoot. You might look at the turret tutorial as well for the ai fire angles, spawning bullets, etc.

    It's all about what you want. If there are no obstacles, or if you just want it simple, you could move towards player x,y. There are about 50m combinations you could use for what you want to do, it's personal preference.

    In your case, I would pull up the "Ghost shooter tutorial" and save it as a new file. Then test different ideas using it as your base-code.

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