Announcement

Collapse
No announcement yet.

Help with Multiplayer Looting System

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help with Multiplayer Looting System

    Hello, I am trying to create a loot system where multiple players see an unlooted item and can each loot it independently and also at the same time. After they have looted the item, it should be disabled or looted for them only and still be lootable by the other players if they did not loot it. How can I go about doing this the best way possible with having a secure/server approved looting system?

    This is what I have now (These are in my ItemMasterBP class)
    Click image for larger version

Name:	118b3a5a3fbf94112d2d1033e403171c.png
Views:	65
Size:	78.6 KB
ID:	1742972
    Click image for larger version

Name:	2cbffc2b1e6e296465dede726adcf411.png
Views:	38
Size:	166.9 KB
ID:	1742973
    Click image for larger version

Name:	7f48b9eba8dced27780fb0b8e851cffc.png
Views:	48
Size:	213.3 KB
ID:	1742974

    #2
    It's a big topic and many solutions, but it's all about replication.

    It works exactly like collecting points in this video.
    https://www.youtube.com/watch?v=3-n9TmWs0C0
    But instead of collecting points, you remove an item that has been picked up by one of the players.
    See the series from the beginning.

    I hope this helps you.

    Comment


      #3
      For server authority you need a way to track whether or not a client has looted the item. A simple approach would be to store the players ID in an array in the loot item class on the servers version. So add a PlayerID array to the class. On server event pickup -> use "find" to search the array for the players ID. If it exists do nothing. Otherwise allow for pickup and add id to the array.

      On the client end simply destroy the actor in their simulation. It'll still exist on the server and on other clients that have not looted it yet. Yet the client that has already looted it there will no longer be a reference...so no double dipping etc.

      Comment

      Working...
      X