What does "Get Controlled Pawn" do exactly?

I know this is a pretty dumb question and the answer is technically in the documentation, but Im a bit lost because Im working from this tutorial and Im trying to figure out how the AI is getting its target. I see Get Controlled Pawn as the only thing it can be but is the Controlled Pawn the character that the player is currently controlling, or is it the Enemy Pawn since its also being controlled, assuming you dont change the Target from “self” within it.

Hello,

Your question seemed a bit confusing for me. The Get Controlled Pawn returns the ‘Pawn’ that given ‘Controller’ is controlling. This is, if Target is self (Player controller in your case) you get the Player Pawn. If Target is the Enemy Controller (BotController for example) you get the BotPawn.

It’s not very clear what you are asking, but here’s an overview of how it work:

When working with AI’s Behaviour Trees, you act on AI Controllers. An AI Controller "possess"es a Pawn, a Pawn being everything from a single camera actor, to a complete skeleted mesh with its camera attached. When you create a character, in its settings you can specify if they are to be possessed by an AI or not, and if so, which AI Controller to use.
You make an AI Controller run a certain Behaviour Tree. When a node from this tree is called, you get the invoking AI Controller, then from it you can get its Controlled Pawn to make it do the stuff you want.
Hope it’s clear.

It returns whatever it’s connected to in Character Blueprint Pawn setting.

Let’s say you have 2 files, “Enemy Character BP” and “Enemy AI”, inside “Enemy Character BP”, you can designate “Enemy AI” as the AI controller in Details → Pawn → AI Controller Class. If you call “Get Controlled Pawn” from AI, it will get whatever is hooked up to which is “Enemy Character BP”