Hi!
Since I’m currently experimenting with multiplayer, I wanted to create a simple currency system.
Since this is a VR project, I designed the system so that when you reach for an item at a merchant, it checks whether you have enough money. If you do, you can take it; if not, you can’t pick it up.
The system works, but as soon as the client takes an item from the merchant, the money is checked by the (list) server and deducted from the player on the server, not from your own player.
So the clients share the “money” from the server, and the UI is only updated on the server, not on the respective client.
I’ve already tried a few things, just on the player pawn, in the player state, etc., but somehow I always end up with the same result. The client has no access to its own money.
And I’m amazed that I can’t get such a simple system to work correctly in multiplayer. Does anyone have any ideas?
Item Spawn with Overlap on the Merchant:
Player: Try To Buy
PlayerState: Check Currency
OnRepNotify Currency:
Thanks!