Making Chest inventory stay empty after item pickup.

The Player opens chest, takes all the inventory. Saves the progress. Next time player plays the game, then loads his inventory, he can go back to the chest and gather the same inventory again. Consequently, he could do this a hundred times and increase his inventory a hundred fold.
Using the Game Object Savor, individually on the Chest itself, or on the Interactable within the chest, or on both, as you previously instructed me, does not work. When the item pickup is added to the chest, the auto interactable function ceases to work.
We would like to keep the chest and not destroy it, but not allow the player to continuously receive items from the chest.
Suggestions?
 
Using the Game Object Savor, individually on the Chest itself, or on the Interactable within the chest, or on both, as you previously instructed me, does not work
Could you explain in more detail why it doesn't work? With a screenshot of your setup?

If your Chest has an Inventory component. You should be allowed to set an InventorySaver component next to it, that will save the content of the chest.

We also have the gameobject saver component that can save the enabled/disabled state of an object. But that doesn't save the values of the components on the gameobject, so I'm not sure it will be very useful in this case.

I do not think we have a saver that saves the state of a chest open/closed. For that you would need some other thirdparty save system, or make a custom saver component (that should be farily easy to do, I think).
 
Picture 1 - 5, I start the game, open the chest, take all the inventory, save the inventory. Exit the game.
 

Attachments

  • Chest 01.png
    Chest 01.png
    461 KB · Views: 1
  • Chest 02.png
    Chest 02.png
    242.9 KB · Views: 1
  • Chest 03.png
    Chest 03.png
    115.5 KB · Views: 1
  • Chest 04.png
    Chest 04.png
    124 KB · Views: 1
  • Chest 05.png
    Chest 05.png
    97.1 KB · Views: 1
Picture 6 - 10. I repeat the Exit game, load game, take inventory, save inventory process as inventory grows to 6x.
 

Attachments

  • Chest 10.png
    Chest 10.png
    38.8 KB · Views: 0
  • Chest 09.png
    Chest 09.png
    79.6 KB · Views: 0
  • Chest 08.png
    Chest 08.png
    104.8 KB · Views: 0
  • Chest 07.png
    Chest 07.png
    330 KB · Views: 0
  • Chest 06.png
    Chest 06.png
    117.1 KB · Views: 0
Picture 1, 11 and 12. I do this process with only Game Object Saver. Then I do it with Game object saver and Inventory Saver. Then I do it with all 3, Game object saver, Inventory Saver, and Item pickup script.
 

Attachments

  • Chest 01.png
    Chest 01.png
    461 KB · Views: 1
  • Chest 11.png
    Chest 11.png
    72.5 KB · Views: 1
  • Chest 12.png
    Chest 12.png
    20.9 KB · Views: 1
I add the Inventory Saver to the Interactable of the chest, which already comes with the Game Object Saver, and have the same results.
 

Attachments

  • Chest 13.png
    Chest 13.png
    56.1 KB · Views: 1
I add the Item pickup script, and can no longer open the chest because the Is Interactable, becomes null. My whole game works off of the auto interact. This is where I am at and decided to seek your help. Thanks.
 

Attachments

  • Chest 14.png
    Chest 14.png
    85.2 KB · Views: 0
  • Chest 15.png
    Chest 15.png
    49.1 KB · Views: 0
  • Chest 16.png
    Chest 16.png
    16.7 KB · Views: 0
Using the Locked Chest solves this issue. So the locked chest could be used for collecting inventory only once, and the unlocked chest can be used to give the player something each time they log in to play.

Please do not spend any time on this unless it is something you would like to consider.

Again, I say thank you. Probably tired of hearing that lol
 
Top