I'm a little shaky on going up and down my tree looking for nodes. I open a treasure chest, and a loot panel pops up. Then I need to re-reference the chest, but I need to figure out how to get there. (The chest name is AWC1, in the debug). Because I'm using rooms and such, I'm not 100% on how to make this basically universal, or if I need to have multiple iterations of the same code for each room plus any chests found outside the rooms.

EDIT: Figured out how to at least show stuff in the one chest using current_chest = get_parent().get_node("RoomManager/Villages/AktiyaWaya/chest") but if I'm going to have multiple chests in multiple rooms, what would that look like? I feel like it would involve setting up the RoomList or the Rooms as a variable? Doing something like get_parent().get_node("RoomManager/Villages/AktiyaWaya/" + chest) just to access the chests in the one room is throwing errors.

EDIT 2: Figured out how to access all of the chests in one room. Is there a simple way of accessing all of the chests in all of the rooms, or would it be better to keep all of the chests outside of the RoomManager and access them that way?


What are the properties of the chests and what operations are performed on them?

    DaveTheCoder

    It's basically the overarching code for opening a chest and viewing the loot inside. Right now I can grab all the chests in Aktiya Waya, but I don't want to copy/paste for every room, plus anything that might land outside the rooms. I'm thinking I might just have to keep all the chests outside and reference them from there.

    I think this is the part where someone tells me I'm misunderstanding how Rooms work.

      abizrihays I think this is the part where someone tells me I'm misunderstanding how Rooms work.

      When you say 'rooms' do you mean scenes?

        abizrihays It's basically the overarching code for opening a chest and viewing the loot inside. Right now I can grab all the chests in Aktiya Waya, but I don't want to copy/paste for every room, plus anything that might land outside the rooms.

        Why do you need to duplicate the code? You could place the "chest code" in an autoload, and access it anywhere.