How do I get a node by it's own index in the tree? help me

I’m trying to write an inventory system. I’ve been spending the last few months on it (on and off) and I feel like I’ve gotten a firm grasp on how arrays work and how I could do it. This is my chart


The green parts is where I’m having trouble. I can’t seem to get the number for the index when it’s pressed and set it to the “pop at” function. (The following image is from my testing scene).

Instead of using the button_pressed signal for this, you should create a custom signal that allows the buttons to pass self or their index as an argument. Each button would then emit this custom signal in response to its own button_pressed signal.

Does this let me take that button’s value in the index (e.g button’'s value is 4), then take that value and make it equal to my ChildTestNum to make it easier to Inventory.pop_at(4)?

Sure, though it does seems pretty complicated to do it that way.

If the buttons pass their own get_index() as argument, the called function receives it and can use it for whatever.

Thank you. I’ll look into creating custom signals.