I used a generic trigger with an on enter event to apply a visual effect at a waypoint. (Wall of Fire). Now I need to get rid of it, but I can't. No matter what I do it just keeps on burning.
Please help
Here is the code I used to Apply the Effect. This part works great!
effect eFirewall = EffectAreaOfEffect(AOE_PER_WALLFIRE);
if ( GetLocalInt(OBJECT_SELF, "MarkAsDone") == 0 )
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eFirewall, lfw1); ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eFirewall, lfw2);.
}
//*******************************************
This is what I found in the old forums but I can't get it to work. I don't know how to define oTarget since the effect is applied to a location, rather then a creature. Thanks in advance!
object oTarget = GetArea(OBJECT_SELF);
effect eEffect = GetFirstEffect(oTarget);
while(GetIsEffectValid(eEffect))
{
if(GetEffectType(eEffect) == EFFECT_TYPE_AREA_OF_EFFECT
&& GetEffectInteger(eEffect, 0) == AOE_PER_WALLFIRE)
{
RemoveEffect(oTarget, eEffect);
break;
}
eEffect = GetNextEffect(oTarget);
}
Modifié par Hilltop2012, 30 juillet 2010 - 08:06 .





Retour en haut






