How do I make enemy ai which enemy move towards to player but stop in certain distance?

0 favourites
  • 3 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I am a beginner and I thought making my own game best way to learn constuct 3 instead of making preset tutorial game.

    I am making a top-down shooter game. I want to enemy move towards to player slowly but stops in certain range. I certanly doing trial and error with pathfinding and move to behaviors.I didnt find to correct answer. I dont know how to do it clearly . Please help

    This is what i want:

    Ps: I am not naitive speaker. Sorry for my writing mistakes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use line of sight behaviour on the player where if player has sight of the enemy then the enemy will stop, you can set the line of sight to a 360deg range around the player. Or from the enemy perspective you can stop moving along a path if distance between enemy and player is a certain value, use distance() command with the two objects enemy and player.

  • You can use line of sight behaviour on the player where if player has sight of the enemy then the enemy will stop, you can set the line of sight to a 360deg range around the player. Or from the enemy perspective you can stop moving along a path if distance between enemy and player is a certain value, use distance() command with the two objects enemy and player.

    Thanks for the advise. I did what you said with move to behavior. I tried pathfinding calculete player location and move along when calculated but didnt work. Enemies just standing.

    How do I make it with pathfinding?.

    This is move to behavior one:

    This is my sheet with move to behavior.

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