Replicate Personal stuff...

Hi iam trying to keep my netload low. How would i deal with replication of lets say an inventory, where its data ist just relevant to its owning player? I mean i want to keep the inventory etc on the server and just replicate it to the player it belongs to

You can use conditions for it like so.


DOREPLIFETIME_CONDITION( AActor, ReplicatedMovement, COND_OwnerOnly );

See more info .

Hope it helps. (:

ill give it a try. My test setup has a character who has a variable wich i want to be able to read by the owning char but not from any other character ive tried the bOnlyRelevantToOwner bool, wich didnt helped :S

Edit: Thank you Mister, i think i got it working the way i wanted it.

Glad you got it working :slight_smile:
Tidbit information: bOnlyRelevantToOwner is for the entier Actor/ object so other player will not see it at all (e.g: FPS Mesh)…
With the replication condition the actor will be replicated but the inventory will only replicate to the owning controller/ client of that character.

Well i converted my Inventory (wich was ablueprint actor) over to c++. I found it very hard to deal with the inventory beeing an actor. I Create a Static Library with functions for modifying the inventory (Add, Remove, Split, Merge etc). No the Player Only holds a Variable of a CustomStructure Datatype wich is then passed to the Library Functions. Well have to deal with the server side distribution of stuff next :S