When I refill mana by 100 points(with gameplay effect) . On my Hud I still see 100, but internally character has more and it keeps 100 until falls below 100 so I can actually see changes.
Where do I clamp values properly? I tried reading Tranek Git Documentaiton but is so confusing as it points to this methods…
In the AttributeSet header, there is this comment on the PreAttributeChange function:
This function is meant to enforce things like "Health = Clamp(Health, 0, MaxHealth)"
I’m pretty sure this means you need to also clamp your actual value and not just the new value. I’m not familiar with this plugin and this class, so I can’t really give you an exact line of code.
Edit:
I also read a bit of tranek’s documentation. I found this note about AttributeSets:
Note: Any clamping that happens here does not permanently change the modifier on the ASC . It only changes the value returned from querying the modifier. This means anything that recalculates the CurrentValue from all of the modifiers like GameplayEffectExecutionCalculations and ModifierMagnitudeCalculations need to implement clamping again.