What is the best way to determine if a pawn is owned by the one executing a command?

I would like to run an event as soon as possible when a player takes control of a pawn, but only for the owner. How can I determine if that pawn is owned by that client (or server if it’s a listen server)?

I’d like to know if it’s a player or AI, and if it’s owned by the executor or another player.

I’d also like this to be handled in the pawn’s blueprint if possible.

and

are perhaps events you might want to use, but it sounds like in the begin play of your pawn you want to check its owning pawn, you can try casting it to a player controller, it will not cast if its an AI pawn

EventOnBecomeViewTarget seems to trigger when I need it to, but it also triggers on the server. On the server, how can I check if the pawn is owned by the server after that event fires?

there is a “is dedicated server” node, or you can be old school cool and check for a instance of a hud :smiley: (use the first one)

I cant assume that the server is dedicated. It could be a Listen server.

the has authority node bool or control flow node then - its a pain to get this stuff isolated, make sure you comment your code cuz trust me, when you come back 6 months later you’ll forget all the reasons you coded it that way