Author Topic: Ability Overwrite  (Read 738 times)

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Ability Overwrite
« Reply #15 on: March 31, 2011, 09:43:08 pm »


               I see shadow already fixed it. but just encase you wanted to know what was happening.  I placed comments on each one of your brackets at the bottom of you script for what they started and what they where the closing bracket for.  If you note the function you where useing to advance oTarget was outside of the while loop.  therefore the loop never ended.


....
....
        while(GetIsObjectValid(oTarget))
        {//Start While
            RemoveEffectsFromSpell(oTarget,GetSpellId());
     .
             // * GZ Oct 2003: If we are silenced, we can not benefit from bard song
             if (!GetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
             { //Start If level 1
                 if(oTarget == OBJECT_SELF)
                 { //Start If level 2
                     effect eLinkBard = EffectLinkEffects(eLink, eVis);
                     eLinkBard = ExtraordinaryEffect(eLinkBard);
                     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLinkBard, oTarget, RoundsToSeconds(nDuration));
                     if (nHP > 0)
                     {//Start If level 3
                         ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nDuration));
                     }// end if level3
                 }//End if level 2
                 else if(GetIsFriend(oTarget))
                 { //Start If level 2
                     ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
                     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
                     if (nHP > 0)
                     {//Start If level 3
                         ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nDuration));
                     }// End if level 3
                 }// End if level 2
             }// end if level 1
        }// End while loop.
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
}//End Main.


               
               

               
            

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
Ability Overwrite
« Reply #16 on: March 31, 2011, 09:46:41 pm »


               Glory ... it works. Thank you so much I'm going to have to put a statue of a troll and call it ShaDoOoW in my mod!
               
               

               
            

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
Ability Overwrite
« Reply #17 on: March 31, 2011, 09:49:59 pm »


               Thanks for the information lightfoot helps a lot. I know the game is old but i'm new to scripting heh so any information like that is very helpful to me.