Download

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)



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.

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.