Get AIController via c++

Hi all. I spawn on server ACharacter* Bot;

I want to GetAIController and then call “move to” function via c++

302593-aicontroller.png

I want to do the same that in screenshot, can you help me please?

I tried Bot->GetAIController, but this function is doesn’t exist

Maybe this will help:

AIController = Cast<AMyController>(GetController());
if (AIController)
{
   :
}

thx, but I want to get AIController from my Bot variable, not from myself

I have classes derived from AAIController and others derived from APawn. During BeginPlay in the pawn class I use GetController to get the AIController for the given pawn, which does work. The same doesn’t work for you?