AttributeModifier - EnableModifier(false) doesn't subtract from current value?


New member
Hey, all!
I have a collection of abilities meant to raise a character's base stats according to a roguelite permanent progression system. These abilities simply initialize an AttributeModifier and enable or disable it according to the abilies' state.
They successfully raise the stat when enabled, but won't lower the stat when disabled.
The Modifier.EnableModifier(false) gets called, but my stat remains 'buffed'.

Am I using AttributeModifiers wrongly?


  • PPAbility.cs
    2.3 KB · Views: 0
When EnableModifier(false) gets called it doesn't reset the attribute value - it just stops the attribute from being auto updated. Is that what you are wanting?
Oh, I assumed disabling the modifier would also null out its modified amount. In order to achieve that effect, should I just do Modifier.Amount = 0 then? Or is there a more appropriate way?