Looks like I didn't get it after all, haha...
What am I doing wrong? In one script I have:
effect eBonus = EffectACIncrease(GetLocalInt(oPC, "MountedBonus"));
eBonus = SupernaturalEffect(eBonus);
AssignCommand(GetModule(), ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBonus, oPC));
This works perfectly and applies properly defined AC bonus to PC.
But then I have a script that is supposed to remove that:
void main()
{
object oPC = GetPCSpeaker();
effect eEffect;
eEffect = GetFirstEffect(oPC);
while (GetIsEffectValid(eEffect))
{
if (GetEffectCreator(eEffect)==GetModule()) RemoveEffect(oPC, eEffect);
eEffect = GetNextEffect(oPC);
}
}
But this one does not seem to work - it compiles, alright, but no change occurs - the PC is still subject to the said AC bonus.
What am I doing wrong?
Modifié par Grani, 25 septembre 2013 - 09:39 .