Cannot remove item from array from child BP
I have an array of structs which is defined in my parent BP. When i try to remove an item from the child BP, the Remove node returns true, but on the next loop through the array, the item it still there.
Has anyone had a similar issue?
asked Jul 31 '15 at 11:08 AM in Blueprint Scripting
If there is no spawned instance of the parent then the values can't be changed as nothing can change on something that doesn't exist. You need to spawn the BP into the world and keep it there. Create a variable to hold that instance and manipulate the parent from that variable instance. Once you destroy that instance of the parent then those values will reset to default.
Hope this helps!
PS. I also wanted to add that a parent should only have generic information for each child to inherit and have the child implement values to themselves. Placing hard coded values on a parent for each child to change probably isn't the best solution or you may end up with undesirable results. For instance, say you have a health value on the parent which each child inherits. If you have the children change their own health on the parent then all children's health will change to reflect the parent.
Follow this question
Once you sign in you will be able to subscribe for any updates here