Copy a list of things and connect it to a user

If I’ve understood correctly, you have a list of items (let’s call them weapons) which are available to all Players. Each time you (as admin) add a new Weapon to the main inventory, you want to make the weapon available to all Players, including existing users for whom the weapons won’t have been available previously.

If so, I create data structure as follows. All Players would have “Weapon” and that field would connect to list of Weapons in your weapons inventory.

Screenshot 2023-03-17 at 12.20.30

Every new user would get a “set list” of current weapons.

Screenshot 2023-03-17 at 12.29.37

Every time I added a new weapon, I’d make changes to all existing players and set (effectively reset) their list of weapons to your current list of weapons.

Screenshot 2023-03-17 at 12.31.04

If I’ve missed the point of your question, sorry, ignore me!

Thanks for taking the time to respond! The only issue with this set up is it doesn’t take into account that each weapon would need to start with a quantity of 0, and when they finally gain the weapon the quantity would change to 1. Doing a set list I think would reset all the weapons they have received back to 0 in this case (I believe). The set-up I have now is that I created a list of default weapons, and have it run through a loop for each one the player doesn’t own, adding it to their inventory. It’s pretty complicated looking but it works!

Thanks again for the help though, I haven’t found a good use for set list yet, but yours seems pretty intuitive if the situation was a little different!

I should do a detailed response on how Mike helped me achieve this, I’ll add it to my todo list lol.

2 Likes