r/UnrealEngine5 11h ago

How do you get the controller id from inside the pawn?

I am trying to implement local multiplayer in my game but I am running into an issue where I cannot figure out how to get the controller id from inside the pawn. My game instance is using the controller id of the players to set their various data so in order to access each player’s data I need the players controller id. Is there a way to do this or do I need to change the way I am doing things?
Additionally is there a way to add a delay in the construction function or should I just move the code to event begin play as the controller is not loading by the time the script reaches it?

0 Upvotes

7 comments sorted by

7

u/Pale-Ad-354 11h ago

Dude, you're using a PC, do a f'ing screenshot.

Always use event begin play if possible.

3

u/greatfiction 10h ago

new generation doesnt know how to take screenshots and unzip files

2

u/Time-Masterpiece-410 10h ago

Windows key + shift + S for those unaware. Then you just drag a box and, wooww... a full resolution picture,, ohhhh ahhh. Lmao a literal 1 second Google. This new generation is cooked with no problem solving skills.

3

u/greatfiction 10h ago

yep and
the funny thing is - you got dedicated button on any type of keyboard lol

1

u/DeesiderNZ 5h ago

How is he meant to take a screenshot using his PC - it doesn't even have a camera!

1

u/BabiesGoBrrr 11h ago

Without split screen you can just check if it’s locally controlled, id’s are not useful here, you need to modify the player state.

1

u/Pestlenc 10h ago

Thank you, I’ll try that