Download

Some Networking questions.

Hi. I’ve been looking trough the Shooter Game example to understand the networking system in depth, but I have some questions.

Are input replicated automatically?

APawn::IsLocallyControlled() only returns true on the client (and listen server) that has a PlayerController possessing this pawn, so it will never be true on a Dedicated server? (this maybe a dumb question, but I just want to be sure).

Will PlayerState always be replicated independent of distance (always relevant)?

Lets say we have a RPG game with different character classes (warrior, mage, archer, smith…), so one character class has Health and Stamina while another have Health and Mana. All of these attributes should be declared on my custom class that inherit from APawn, right? Or does it support multiple (different) PlayerState?

All actors that I add to the ActorList in GetSeamlessTravelActorList() (on both GameMode and PlayerController) persist a level change, right?!
Does the APawn lose possession?
What methods are called on these actors after the new level loads?
If I have a inventory (a simple List in this case) that has references to spawned actors on the last level, should I add them to the ActorList too?

I think that’s all I remember for now (I should have taken some notes :frowning: ).

Thanks for your time.

As far as i know, only the Movement that gets applied by the MovementComponent is replicated. If you have input setups
for movement or other things, you need to replicate them yourself.

This is how i understood it. So yes. But you could test it if you want to be sure. The method exists as a node for BPs.

Is it set to always relevant? It should do, otherwise the idea of the PlayerState wouldn’t work :X

No, PlayerState is limited to one per Client. It is linked through the PlayerController. Character Attributes that change due to different Pawns should be stored in Child Classes of APawn or ACharacter, since they can be changed by possessing them.

Haven’t worked with this yet, but this is how i understood it.

Sorry, don’t know about that. Haven’t worked with seamless travel yet.