Hello everyone,
I’m developing a co-op survival game and I’ve run into a multiplayer UI issue that I can’t seem to solve.
The Problem: When a client uses a consumable item from their inventory, the item is correctly used and removed from the inventory data. However, the UI does not update in real-time. The used item slot only disappears after I close and reopen the inventory widget.
My System Setup:
-
BP_InventoryComponent: An actor component on my player character. It holds the inventory data.-
It uses a non-replicated
TMapfor the server’s master list. -
It has a
RepNotifyTArrayof a struct, which acts as a replicated “mirror” of the inventory for clients.
-
-
WBP_InventoryScreen: The main inventory widget. -
WBP_InventorySlot: The widget for each individual item.
The Logic Flow: My update logic is designed to work like this:
-
The client clicks on a
WBP_InventorySlot, which calls aServer_UseItemevent on thePlayerCharacter. -
Server_UseItemcallsServer_RemoveItemon theBP_InventoryComponent. -
Server_RemoveItemcorrectly updates the server’s masterTMapand then calls a function (UpdateReplicatedItems) to sync theTMapto theRepNotifyTArray. -
This change in the
RepNotifyTArraycorrectly triggers theOnRep_ReplicatedInventoryItemsfunction on the client. -
Inside the
OnRep_function, I call an Event Dispatcher namedOnInventoryUpdated. -
In my
WBP_InventoryScreen’sEvent Construct, I get a reference to the inventory component and use aBind Event to OnInventoryUpdatednode. This node is connected to myPopulateSlotsfunction, which clears and redraws all the item slots.
What I’ve Debugged: I have used Print Strings and confirmed the following:
-
The
OnRep_ReplicatedInventoryItemsfunction IS firing correctly on the client after an item is used. -
The
OnInventoryUpdatedEvent Dispatcher IS being called correctly from within theOnRep_function.
It seems the signal is being sent, but the UI widget isn’t “hearing” it or reacting to it, even though the Bind Event node is set up.
I’m hoping someone can spot what I’m missing. Why isn’t my UI refreshing in real-time?
Thank you for your time!




