I’ve got a Structure S_CharacterInfo, that has several variables inside of it, for this conversation, I’ll pull out Health, MaxHealth, Energy, MaxEnergy, Ammo, MaxAmmo, Armor, and MaxArmor.
In my code I Get the Structure, split the pin and I can retrieve the values I want. However, when I set the variables, everything seems fine, until something else needs to read the values from the Structure. Then the values are reverted to before I set the variables inside the Structure. It’s like Unreal isn’t actually saving the values in the Structure.
For example, I have an action, the Z key that fires my laser gun. It subtracts one Ammo point, the ProgressBar updates perfectly, then I run across an AmmoBoost Spawn, and I get +15 ammo. That’s all great, until I either shoot my laser gun, which it resets to my previous 20 ammo, or if I run across a Healing trigger. Then my Health is boosted, but my Ammo is reset to the previous 20. If I run across an AmmoBoost after the Health Spawn, my Health is reset to the initial level it was at previously.
Is there a Refresh Structure command or function I don’t know about to force my Get S_CharacterInfo structure to refresh when the variables inside are updated? I would think that just using the Set S_CharacterInfo (split structure, and piping the new value into the appropriate variable slot would be enough, but maybe I’m missing something?
Forgive the mess. I haven’t cleaned up all the pins just yet.