Cannot get modular inventory system to work fluently with Client

isikdev
Tue, 26 Apr 2022 17:44:29 +0000
Multiplayer & Networking

Hello. I am trying to implement this inventory system to my project:

GitHub

GitHub - MaximasPrime/Inventory-Component: Easy to use Inventory Component

Easy to use Inventory Component. Contribute to MaximasPrime/Inventory-Component development by creating an account on GitHub.

I managed to do it and set everything up. However, now I am trying to do a chest system in where each player can transfer their items from their inventories. Sadly I’m having an issue with owner and relevancy logic which also seems to not work correctly on the provided project for the system.

The way the inventory system works is from an inventory component. I have one in the player controller for the player inventory, and one in the chest actor for the chest/vault inventory. The component creates an inventory widget on BeginPlay and sets it as a replicated variable with the condition Owner Only.

The inventory system works fine, however the widget for the chest inventory gets added/removed from the server successfully but not for the client. It gets added, but doesn’t get removed and gives accessed none errors. This is the code for the chest actor:

This is the client event which executes from the player controller:

And the replication settings I’m using for the chest actor: (all components are set to replicate)

Video demonstration:

https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/0/d40a291256aa05ff04f0842810bc8d561524b807.mp4

Fresh project with the component from Github link above, reproducing same issue (no errors because it has valid check):

https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/3/3731e98f50c3633b36eb8ac40e17b38dcc112d67.mp4

Now I’m still pretty new to Multiplayer so I’m not certain where the issue is coming from. Any help is appreciated kindly. What could I do to fix this problem? Appreciate it!

Edit: If I remove Set Owner it works as intended, but drag and drop does not work. So it has something to do with the Owner… Am I setting it wrong by any chance?

5 posts - 2 participants