• 0 Posts
  • 1 Comment
Joined 2 years ago
cake
Cake day: July 23rd, 2023

help-circle
  • I have an add-on that will help with game state like locked doors and stuff. You an find it in the Godot asset library as Game State Saver Plugin. If installed directly from the Godot editor, you’ll get a watered down demo with the add-on. But a more extensive example can be obtained by downloading the entire repository. That full demo has a locked door, switches that affect things in other level scenes and remember their state, and more.

    As for a more flexible, extensible system for inventory I would look into custom resources. You can add things to the custom resource like an inventory texture, display name, and other info about an inventory item. Then you can use an exported property array and add the items as needed. You can even save the individual resources as resource files for easy reuse and updating later.

    Now how to connect a custom resource to the save system is something I have not gotten around to doing, so I can’t say exactly how that would work right now.

    Hope this helps!