New Blueprint Networking Tutorial Videos Posted

Argh! Sorry again for being slow on the replies, was in Portland and then ill. Just now getting caught back up.

For movement stuff, you might want to check out what the top-town template game is doing. I’ve not played around with it much, but I just realized it might have player controlled movement in the style you’re looking for.

Yeah, so getting the player controller that way is not great unless you’re in a situation where the info you want only needs to be available to the owning client and the server. Was just pointing out that it’s technically possible to get back to the controller in that scenario on the server/owning client. It’s fine to have the team info on the game state and the individual player state to have a reference to its team info as well.

In this scenario, if you just want to do a local client initialization, set the camera, etc., you could probably actually do it on the OnRep of the TeamInfo on the PlayerState itself. You could cast the owner of the PlayerState to your PlayerController class (which should only be valid on the owner and the server) and then if it’s something you only want to happen for the local player (like camera changes), also make sure the controller IsLocallyControlled(), and if both of those things are true, then do w/e logic you want.

Re: general tips for this, we try to avoid complex chains of multiple references requiring each other to be initialized in order to handle replication. In the event we do have to do it, you can usually either have the reliant OnRep calls do similar things but only have whichever piece comes in last handle the actual code, or you could use timers to delay until pieces have replicated down. The timer solution can get out of hand/hacky if you use it everywhere, but it’s not too bad in minor cases. To do it, you’d put a non-looping timer (GetWorld()->GetTimerManager()->SetTimer(…)) in the OnRep that when called will verify if you have all of the things necessary. If not, the timer sets itself again. We tend to avoid the timer solution, but it is an option.