Same AI moves to 0 instead of chasing the player when reused in a different game

Hello there,

I am new on Unreal and BluePrints and I have implemente a simple AI that chases the player following a tutorial on internet. It is this one:

Now, I started a new game and I was trying to reuse the AI but it simply goes to the 0 position. I assume that what is happening is that there is something wrong with the function “Get Player Character” and the AI simply goes to the default destination. Does someone know what can be the issue and, more important, how to debug similar problems when programming with BluePrints?

Thanks for the help!

Regards,
Raul

Hi Raul, I’d suggest making sure that the “Default Pawn Class” in your Game Mode is set to your Player Character class. Without it, the AI will move to the 0 location. Also, for debugging purposes you can click on the AI Move To node and press F9. This will cause the execution to stop at that point and you can verify the values of all incoming variables.

Hi Stormrage256,

Thanks a lot for the help. I have been reading a bit and using the debug features that you pointed and I solved the problem by replacing “Get Player Character” with “Get Player Controller”.

Regards,
Raul