Hello,
I have got a strange problem: I would like to remove a visual effect from weapon, but it simply does not work. If I use spells like Flame weapon or Darkfire, the Visual Effect is removed by the script. But if i want to remove it from a weapon which has got effect from the beginning (like Angurvadal (Flame Tongue)) it is not working ![]()
What is more, when i run the script while having Angurvadal in my PC hand, I do not see "Debug 3"
What is wrong? Angurvadal fire effect is not a visual effect or what?
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
if (!GetIsObjectValid(oItem)) return;
itemproperty ipLoop=GetFirstItemProperty(oItem);
FloatingTextStringOnCreature("Debug 1", oPC);
//Loop for as long as the ipLoop variable is valid
while (GetIsItemPropertyValid(ipLoop))
{ FloatingTextStringOnCreature("Debug 2", oPC);
//If ipLoop is a true seeing property, remove it
if (GetItemPropertyType(ipLoop)==ITEM_PROPERTY_VISUALEFFECT)
{ RemoveItemProperty(oItem, ipLoop);
FloatingTextStringOnCreature("Debug 3", oPC);
}
//Next itemproperty on the list...
ipLoop=GetNextItemProperty(oItem);
}
}





Retour en haut






