I made up a C++ ThirdPersonExample project. I added several ThirdPersonCharacter BP. (TPC BP) I added a variable to the TPC BP.
I play as one of the TPC BP's. The other ones are controlled by AI.
In Event Graph of TPC BP, on Event BeginPlay, I want to set a variable if this current instantiated TPC BP is the controlled pawn - ie it's me playing!
I see that you can set variables.
However:
I may be thinking of this the wrong way...any help appreciated.
I think that the easiest solution would be:
Add Event Possessed
to TCP BP. This should be fired when your pawn (character) is possessed by a controller.
Since previously mentioned event has parameter - reference to a possessing controller, you can then try to cast that reference to PlayerController and AIController ( or their descendants).
Final step is to implement specific code for both types of possessing controllers (when cast was successful).