AI move problem

I want the AI to follow the player,do damage and make patrol. On ThirdPerson Map it works, but on SideScroller only do damage.

Does Cast to Character fail?

It seems to work, but still dont move XD.
What dosent work is the success move AI to

Blockquote

On the Pawnsensing, you are setting in range true no matter what pawn is sensed. Unless you have only see player pawn checked (in pawn sensing details). Which if that is true skip this suggestion… Suggestion here, after casting to the player character, set it to a variable. Then branch that to a bool to make sure that the player character is the sensed actor. If it is, then move AI to character. If not call to Move to point 1-2.

You are calling to remove damage to player’s HP regardless if your AI moved to him or not. Instead move that to the if successful?

Then you are calling move to point whether your AI moved to the character or failed to do so. So it will always call move to point and always set in range to false. Suggestion, just call move to point on fail. Maybe check to see if the player is alive or something first if you do want the AI to move away from the player once it reached it.

Since in range will always be false, every other tick will make the flip flop, flip and flop from A to B. So every other frame the AI is going to point 1, then the next frame to point 2. So, it will never move. Its trying too, but because its flip flopping on each frame (well you do have the 1.5 sec delay, so its not quite every frame but…), it looks like it isn’t. Suggestion, after the flip-flop you have the move to point 1 and 2, again you have both the failed and if successful calling the next move to point. Change that to on successful only? If you want to still go to the other point on if failed, then maybe add a check for the AI movement speed. If its zero (maybe its stuck on something) then call the move to point again to reverse it (so it flip-flops).

Just suggestions above. Maybe they make sense or maybe not. Hope it helps though. Good Luck!

~

Yes Only See Player is on. The AI is programmed to make patrol using point 1 and 2, if sees the player he will chase and only do damage if is at a certain distance, but he dosent need to move to inflict damage if the player is at the said distance (wich is literally face to face) he will take damage. Also the AI only works if the onseepawn is conected

I get the idea, but still is kinda hard to get.