Getting struct information from a child from a parent

This is how i would like to set up the items in my game (below) each level has its own struct containing the information that is required for itself or any children.

The issue being that i want to put the “use” event into the master item. so if the item is a consumable it gets the information from the consumable child and alters the character appropriately.

I can’t seem to figure out what node i need in order to get the information from the child struct.

To maybe give a better idea of what i mean this is how i currently have things set up. The issue being that MasterItem currently has all of the structs inside of it. so there is only one level of child-parent. Im not sure but i think this is poor optimization.

In a nut shell, i just need to know how to get information from the child into the parent.

Appreciate any help. any questions feel free to ask.

If you want to get child information as a parent

  • You can either create the variable in the parent class, and utilize it in the child.
  • Or you can in the parent, try to cast Self to an instance of the Child Class, and get the information from your casted object.

If you want to get parent information as a child.

  • Public variables in the parent should accessible, if you don’t see them in the variable side-bar, change the filter information to Show Inherited Variables.

Thanks Ben, appreciate the help.