Multiplayer Inventory

Updated on November 29, 2018 in [A] Multiplayer
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
4 on November 21, 2015

Hi all. So my friends and I are working on an evolve like multiplayer game, following along with Brackey’s UNET tutorial for the networking part. The game requires an inventory system so players can carry and equip equipment. The problem is, we have no idea how to set up the inventory system to work on a per-player basis. We’ve been using Brackey’s inventory asset, which works well when there’s only one player on the server; but when another player joins, pressing the inventory key no longer works. We’re all stumped on how to make it work. Thank you in advanced!

  • Liked by
  • SkyHighStudios
  • Mizuotaku
Reply
3 on November 21, 2015

Hmm, that sounds interesting. I would like to know more about the mechanics you are using in this Evolve like game. Though I am not that good at programming but quick question do you have the inventory set up for each character?

on November 21, 2015

The plan was to have the inventory setup for the player prefab, so that when a new player joined in, it was created along with the player. If that’s what you meant by having an inventory set up for each character.

on November 17, 2018

i am doing the exact same thing and would LOVE to know the answer

on November 29, 2018

Hello, here are some random thoughts.  Watching Brackeys tutorial he has a ‘Player Setup’ script that has ‘Components to Disable.

My thought is to put the inventory into that list, so that there would be one for each player and would run under the client attribute.

If we needed to pass information to the server we’d then use command attribute, as I’m sure you know.

When it comes to the Server / Host I was thinking along the lines of using a database eg SQLite which works with C##.  One problem would be if the Host disappears, what happens to the database?  

But is this over-kill?

Regards,

Nick (Retired)

Show more replies
  • Liked by
Reply
Cancel