Download

Replication - My Controller Takes Over Pawn

I’m trying to take over a pawn in multiplayer. So I’m attempting to get the player’s id from the Game State -> Player Array.

I haven’t had any luck, how do I get the player’s id? Of the one who’s attempting to take over the pawn?

ac6a208fc0e91c3c5fd98c9b51f29af05cad0738.png

Well the first problem I see is Get Owner which returns an Actor and you’re trying to cast it to PlayerController. That will never succeed. It helps to troubleshoot these things by putting a node in the Failed exec pin with a print string or breakpoint. Also note that the player controller isn’t replicated.

It seems to have been working. When I change the 0, to a 1, different clients are able to take over the pawn. But I have to know the ID# before hand.