Skip to content

GetEffectTag : Empty

badstrrefbadstrref Member Posts: 124
edited December 2017 in Builders - Scripting
Applying it:
 
effect eVis = EffectVisualEffect(GetRandomGlowAura());
       TagEffect(eVis, "DOME_AURA");
       ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis, oPC);


Retrieving it :

void RemoveEffectByTag(object oPC, string sTag)
{
  effect eEffect = GetFirstEffect(oPC);
  while(GetIsEffectValid(eEffect ))
  {
    SpeakString(GetEffectTag(eEffect ), TALKVOLUME_SHOUT); // Empty
 if(GetEffectTag(eEffect  ) == sTag) {RemoveEffect(oPC, eEffect);} 
 eEffect  = GetNextEffect(oPC);
  }
}
Anyone had more success than me using effect tags?

Comments

  • SherincallSherincall Member Posts: 387
    You're supposed to link them like you do with e.g. SupernaturalEffect() and similar functions:
    effect eVis = EffectVisualEffect(GetRandomGlowAura()); eVis = TagEffect(eVis, "DOME_AURA"); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis, oPC);
  • badstrrefbadstrref Member Posts: 124

    Thank you!
Sign In or Register to comment.