I've a strange little issue going on with the icons that appear next to the PC's portrait. I have an event that decreases the PC's ability score using:
effect eChange = EffectAbilityDecrease(STRENGTH, 3);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eChange, oPC);
This works exactly like it's suppose to. When I want to increase or decrease the penalty I'm using:
eBad = GetFirstEffect(oPC);
while(GetIsEffectValid(eBad))
{
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE)
{
RemoveEffect(oPC, eBad);
}
eBad = GetNextEffect(oPC);
}
and then I again use the above snippit of code with the new penalty.
That works as well, BUT the Strength Decreased Icon next to the PC's portrait vanishes even though the Strength is decreased (as seen on the character sheet.) When I save/load the game at this point, the Icon returns.
Any help? Is there a better--more proper--way of doing this that doesn't kill the icon?