Client doesn't have controlled pawn on Event Begin Play but Server does?

I am creating a 2 player demo and am trying to spawn a Widget on both the Server and the Client but I am facing two problems:

  1. When Event Begin Play is triggered I Get Controlled Pawn and cast it to my character. This works fine for my Server but not for my Client. It seems the client has a controlled pawn eventually but not when this event is fired. Am I doing something wrong?

  2. I am spawning a Widget in the player controller on Event Begin Play but as the Server has 2 player controllers whereas the Client only has 1 the Server ends up spawning 2 Widgets and the client spawns 1. Is there a way to check if this Player Controller ‘belongs’ to me? i.e the server will check Player Controller 0 and it will spawn the Widget and then the server will check Player Controller 1 and will not spawn a widget as that Player Controller ‘belongs’ to the client.

Thank you in advance!

I just solved 2) by doing Get Controlled Pawn -> Is Valid -> Branch, if true then spawn Widget. This works great however I still haven’t figured 1) if anyone knows why this is

Hey there is nodes in networking category which are very helpful, for the first queston you could try using small delay after begin play.

Hey Raikoh, thanks for the reply.

The problem with that method is if a client takes longer than the timer to load in then the timer will not solve the issue. I of course could keep ramping up the timer but there’s going to be a case where a client has a spike of latency or load in time and the timer will end before they have received the possessed character message.

I’ve seen some ways around this problem but they require checking a flag every tick for the duration of the player controller is alive.

Is there a better way to do this or to delay the calling of Event Begin Play until a character is possessed?

Hey, there is a support stream about multiplayer stuff tomorrow : Training Stream - Blueprint Multiplayer Shootout Game - March 10th, 2015 - Announcements - Epic Developer Community Forums.
You could ask a question or just watch it, im sure it’s gonna be very helpful stream, ive been waiting for it :slight_smile:

Thanks Raikoh!

Hi, any news about how to get the Pawn without using a delay? I’m facing the same issue (question 1 in the opening post).