When player dies it crashes game and says in the debug logs MoveToLocation is causing it.

I am currently having an issue where every time my player dies the game crashes and in the debugging logs it says that the : NavArea->K2_GetRandomReachablePointInRadius(GetWorld(), GetPawn()->GetActorLocation(), RandomLocation, 15000.0f);
and the
MoveToLocation(RandomLocation);
are causing the crashes. I have narrowed it down to these as well because when I comment them out the games functions perfect but the AI enemy doesn’t roam. I am trying to have the AI still roam though but when the player dies it should just go to the next level and not just crash. Any help would be great. I will be adding pictures of everything below.
AI Controller.CPP


AI Controller.h

Character.CPP for health check

Error Logs

Disregard this I was able to find the solution. I was wrong in thinking that the random patrol was the problem. The problem was I was calling the random patrol multiple instances which was causing the overload.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.