Aller au contenu

Photo

Vanishing Penalty Icons?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
3RavensMore

3RavensMore
  • Members
  • 703 messages

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?



#2
Shadooow

Shadooow
  • Members
  • 4 470 messages

Delay the new penalty application by a short while like 0.3, should work



#3
3RavensMore

3RavensMore
  • Members
  • 703 messages

Indeed it did.  Thanks.