Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Dryice00 on June 29, 2020, 02:50:49 AM

Title: 2D Enemy AI Shooting Looping
Post by: Dryice00 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
Title: Re: 2D Enemy AI Shooting Looping
Post by: Athin 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.