Can you show more of the setup? Is this running in a loop, for example? How are you passing this data? Blueprints copy a lot of data, this is especially noticeable when working with structs. One often ends up making changes to a copy rather to the intended struct.
There’s nothing in the image that looks incorrect, the snippet is too small to deduct anything.
I’ve been stuck on this problem for about a day now and am at total loss.
I’m able to override my structure correctly, but it seems I can only override it once regardless of how many times the function I’m overriding the structure in is called.
Upon play testing, the first time the function is called and the structure is changed, I get the expected result of “CurrentStacks = 2” which is correct.
However, each time the function is called after that 1st time, I get the unexpected result of “CurrentStacks = 2” which is not correct as each time the function is called it should increment “CurrentStacks” by 1.
I have tested all of my flow control logic and the function is correctly being called…it’s just seems to only update the structure once…?
This has now been solved! Essentially, each new actor spawn was initializing the same assigned abilities “support condition data” which is derived from a Data Table, effectively resetting “CurrentStacks” to 1. To fix, I moved the flow control portion to the actors begin play