I have some pickups in the world: health, armor, bullets… ecc…
Now, when I pickup an item (for example, the health), I use a Widget Blueprint to display the name of the item picked.
If I take the health, the HUD shows “Health picked!”, and so on.
It works, but only in single player mode.
On multiplayer it has a bug: when I take an item on the client, the HUD that shows the name of the item appears on both the client and the server.
I want that to happen ONLY on the client/player who picked up the item.
I would guess you have the way to find out which exact player pick up item, lets say is pawn controller.
So event which updates the Widget should be called from an object which is OWNED by this controller and Event has Replication set as “run on OWNING client”.
OWNER is a controller which set up on the object creation. Player controller, even while it have replicated copies on server, is a controller OWNED by the Game Client which it actually represent. Possessed Pawns have their OWNER set up by the Controller which possessed them.
So if you want something to happen only on Exact target Game Client, you should call the event “run on OWNING client” in object which being OWNED by the Controller of Exact Game Client.
You might notice how i highlight OWNING concept, because thats one of only few things which you really need to know about blueprint networking and this one wasn’t really highlighted in the video series.
update:
“Owner is a controller which set up on the object creation” is simple input http://puu.sh/l23A9.png
What: Update HUD widget.
When: doesn’t matter.
Where: Custom Event “run on Owning client” in the player controller which HUD you want be updated or any other object which was created or set with an Owner of this exact player.
To display the item that a player takes, I use a Widget called ItemPicked. The latter has a function called ChangeText that is called by aFirstPersonCharacter