playMaker

Author Topic: 2D Enemy AI Shooting Looping  (Read 698 times)

Dryice00

  • Playmaker Newbie
  • *
  • Posts: 4
2D Enemy AI Shooting Looping
« on: June 29, 2020, 02:50:49 AM »
I need help with this issue im having, whenever im standing still and the enemy ai loops back, he inches forward and i want it to just be in a stand still if the player is in range of the shot

Athin

  • Full Member
  • ***
  • Posts: 163
Re: 2D Enemy AI Shooting Looping
« Reply #1 on: June 29, 2020, 03:15:05 AM »
Heya,

Looking at it, order of logic seems to be the problem.  You may need a separate state to test the distance of the enemy and if it is within range still, skip straight to the attack FSM. 

Hard to tell in the gif but I'm guessing its taking a step forward first and then checking if its in range making that stutter step issue.