When I first made my game my AI moved and worked without a problem but then when I finished adding in the main menu and customization screen my AI suddenly stop working and just sits there even though I didn’t change anything in his event graph.
This is the event graph for the AI that worked and is the one I still have.
Check if you Cast to EnemyHUD is successful.
Ignore the ‘Display the hud’ part. Its the AI movement that isn’t working for some reason.
I mean, your Cast to EnemyHUD might fail in the event tick, so nothing is happening.
Yes, it used to work before and I remember I had a nav mesh and I still do.
It seems you’re suffering from the bug that makes AI reset its velocity on every move request, and since you’re requesting move every frame (which is generally a terrible practice, efficiency-wise) your AI might end up not moving. The bug has been introduced in two places in 4.13, and in one of the hotfixes one of the points was fixed. I missed the other one, I’m sorry. The other one is fixed in 4.14.
If using latest 4.13 version doesn’t fix your issue consider using other methods of requesting AI to move (like “Move to actor or location”). Also, for your game efficiency’s sake, stop requesting movement every frame
What would I put as the controller because the ‘get a ref to self’ cant be linked with it.
Call ‘GetAIController’ on your pawn (or any actor actually) to get its AIController.
It works now but the movement isn’t as smooth and sometimes, even when I’m in the pawn sensing component, the enemy just won’t follow me. He’ll just randomly stop, and then after a while of me jumping up and down infront of his face he remembers he is meant to start following me and does.