I’m trying to access an array that is stored in a parent blueprint class, and each time I get an accessed none error referring to said blueprint’s construction script.
Here’s what’s going on (with pics!):
First, I have an actor blueprint called Decoy with a ModuleInfo variable referring to a structure blueprint containing four different variables.
From there, in my ship blueprint class (which is parent to multiple ships), I have a variable called Decoy which references Decoy actor in order to call “Module Info.” I also created an inventory array based on module structure blueprint, and on Event Begin Play Decoy’s information is added to this array.
goal here is to display which modules are in inventory by getting each module’s image variable and setting inventory slot button to this image (just like in UMG inventory tutorial). Unfortunately, I’m running into an issue before I can get to that point. Here’s error I get after playing from editor:
“Set Material” is part of Ship Blueprint’s construction script which promotes ship’s mesh and material components to variables. I’m not even sure what this has to do with any of inventory system I’m trying to create.
Lastly, here’s widget’s Event Construct where is casts to ship blueprint and stores it as a variable to use in Refresh Inventory event (taken almost 100% from UMG inventory tutorial). Since I’m limited to 5 pictures, Refresh Inventory event calls Ship variable to get inventory array, break structure, get module image variable, and set this to inventory slot image.