I have AIMonsterController and AI_Character. AI_Character has set AIMonsterController as it’s AI Controller.
The AI MoveTo does not work. Get Player Character returns “Is Not Valid” when called from Event On Possess but if I add a delay node, it works.
How come I can’t Get Player Character? What is the solution for this? The delay node looks like it might be sloppy code(if that makes sense), what is best practice to wait for Player Character to be available? I assume my Event On Possess or BeginPlay(In AICharacter) is being called before Initialization of Player character?
I also tried this code in AI_Character as well and I still need a delay node however the execution makes it all the way to AI MoveTo>On Fail pin. I think Get Player Character & the pawn is valid when called from AI_Character. And of course I don’t run any code in my AIMonsterController when I run this code in AI_Character.
Sorry for the long text but Thank you very much for reading.