Download

Inventory Replication

Hey everyone,

Was curious if someone out there with replication experience can help me with something. When I created my inventory system for single player, it worked really great creating an actor called inventory that was separate from my pawn and handling all my inventory only functions and macros and variables there rather than my pawn. Now I am trying to add replication to my system and I’m finding I can’t seem to spawn a separate inventory actor for each player. I can get it working for the server with no issues but I was curious if there is a way I can basically create a container for each client that joins a game and if so how?

I may have over thought the solution or just don’t get replication enough but any help would be greatly appreciated.

As a side note, I have watched savaikuns and unreals networking videos, many times, but I’m still stuck.

Thanks,
David

Hello,
only an idea i got when i was reading : If you attach your inventory blueprint to the character like a weapon (it’ll may need a dummy root) it would be dedicated without modifications needed. Only thing would be to store the inventory in a variable to have it called for umg. Would it work ? It would be cool and easy. And if it works, you can do the same for backpacks or any container, checking if one is attached, then use it for umg. But once again, this is only an idea i got but i would try.

That was my original thought. I spawned an actor from class, set it to my inventory and then inside my inventory i just set up a print string if “R” is pushed. It fires for the server but not the client. It’s really annoying

Well, I feel really stupid. I forgot that hidden inside one of my functions I had set authority to server which prevented it from ever being run on the client. This is clearly an a PEBCAK issue.

Thanks for the help Fen, I guess I’ve been sitting here too long.

5 minutes to find it is a cool delay imho ^^ Congratulations :wink:

yeah 5 minutes is getting off really easy :slight_smile: it’s the simple things that bring me to my knee’s more often than id like.

Yeah but I usually wait a day or two before posting to the forum because I hate asking for help