• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Making Bosses Spells Uninterruptible

Status
Not open for further replies.
Level 8
Joined
Feb 17, 2007
Messages
368
Whenever I make my bosses cast some spells, like warstomp for example, I want them to not be able to be interrupted if they are knocked back with a spell that knocks the unit back. How would I go about doing this? For now I've just made the unit invul right before he casts it and uninvul after he's done casting. The cast time is 0, yet it is still able to be interrupted by a knockback spell apparently; if timed correctly.
 
I'm using Paladon's knockback system:

  • Actions
    • -------- Knockback System by Paladon --------
    • For each (Integer KB_GeneralIntegers[1]) from 1 to KB_TotalKnockUnits, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (KB_Units[KB_GeneralIntegers[1]] is in KB_KnockbackedUnits) Equal to True
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • KB_ReachedDistance[KB_GeneralIntegers[1]] Greater than or equal to KB_MaxDistance[KB_GeneralIntegers[1]]
              • Then - Actions
                • Unit Group - Remove KB_Units[KB_GeneralIntegers[1]] from KB_KnockbackedUnits
                • Set KB_CountBuffs = (KB_CountBuffs - 1)
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • KB_TotalKnockUnits Greater than KB_GeneralIntegers[1]
                  • Then - Actions
                    • Set KB_Levels[KB_GeneralIntegers[1]] = KB_Levels[KB_TotalKnockUnits]
                    • Set KB_Units[KB_GeneralIntegers[1]] = KB_Units[KB_TotalKnockUnits]
                    • Set KB_Angle[KB_GeneralIntegers[1]] = KB_Angle[KB_TotalKnockUnits]
                    • Set KB_MaxDistance[KB_GeneralIntegers[1]] = KB_MaxDistance[KB_TotalKnockUnits]
                    • Set KB_ReachedDistance[KB_GeneralIntegers[1]] = KB_ReachedDistance[KB_TotalKnockUnits]
                    • Set KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = KB_ReduceSpeedReal[KB_TotalKnockUnits]
                    • Set KB_SpecificSpeed[KB_GeneralIntegers[1]] = KB_SpecificSpeed[KB_TotalKnockUnits]
                    • Set KB_Effects_1[KB_GeneralIntegers[1]] = KB_Effects_1[KB_TotalKnockUnits]
                    • Set KB_Effects_2[KB_GeneralIntegers[1]] = KB_Effects_2[KB_TotalKnockUnits]
                    • Set KB_DestroyTrees[KB_GeneralIntegers[1]] = KB_DestroyTrees[KB_TotalKnockUnits]
                    • Set KB_EffectCounter[KB_GeneralIntegers[1]] = KB_EffectCounter[KB_TotalKnockUnits]
                    • Set KB_EffectCounter2[KB_GeneralIntegers[1]] = KB_EffectCounter2[KB_TotalKnockUnits]
                    • Set KB_GeneralIntegers[1] = (KB_GeneralIntegers[1] - 1)
                  • Else - Actions
                • Set KB_Units[KB_TotalKnockUnits] = No unit
                • Set KB_TotalKnockUnits = (KB_TotalKnockUnits - 1)
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • KB_CountBuffs Equal to 0
                  • Then - Actions
                    • Set KB_TotalKnockUnits = 0
                    • Trigger - Turn off (This trigger)
                  • Else - Actions
              • Else - Actions
                • Set KB_ReducedReal = ((KB_SpecificSpeed[KB_GeneralIntegers[1]] / KB_MaxDistance[KB_GeneralIntegers[1]]) x KB_ReachedDistance[KB_GeneralIntegers[1]])
                • Set KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = (KB_ReducedReal - (KB_ReduceSpeedReal[KB_GeneralIntegers[1]] x 0.10))
                • Set KB_TempReal = ((KB_SpecificSpeed[KB_GeneralIntegers[1]] - KB_ReduceSpeedReal[KB_GeneralIntegers[1]]) x 2.00)
                • Set KB_TempPoint[1] = (Position of KB_Units[KB_GeneralIntegers[1]])
                • Set KB_TempPoint[2] = (KB_TempPoint[1] offset by KB_TempReal towards KB_Angle[KB_GeneralIntegers[1]] degrees)
                • Set KB_EffectCounter[KB_GeneralIntegers[1]] = (KB_EffectCounter[KB_GeneralIntegers[1]] + 1)
                • Set KB_EffectCounter2[KB_GeneralIntegers[1]] = (KB_EffectCounter2[KB_GeneralIntegers[1]] + 1)
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • KB_EffectCounter[KB_GeneralIntegers[1]] Equal to 6
                  • Then - Actions
                    • Set KB_EffectCounter[KB_GeneralIntegers[1]] = 0
                    • Special Effect - Create a special effect at KB_TempPoint[1] using KB_Effects_1[KB_GeneralIntegers[1]]
                    • Special Effect - Destroy (Last created special effect)
                  • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • KB_EffectCounter2[KB_GeneralIntegers[1]] Equal to 8
                  • Then - Actions
                    • Set KB_EffectCounter2[KB_GeneralIntegers[1]] = 0
                    • Special Effect - Create a special effect at KB_TempPoint[1] using KB_Effects_2[KB_GeneralIntegers[1]]
                    • Special Effect - Destroy (Last created special effect)
                  • Else - Actions
                • Unit - Move KB_Units[KB_GeneralIntegers[1]] instantly to KB_TempPoint[2]
                • Custom script: call RemoveLocation (udg_KB_TempPoint[1])
                • Custom script: call RemoveLocation (udg_KB_TempPoint[2])
                • Set KB_ReachedDistance[KB_GeneralIntegers[1]] = (KB_ReachedDistance[KB_GeneralIntegers[1]] + KB_TempReal)
          • Else - Actions
So I would alter that last part where it says Move KB_Units instantly?
 
You need to put "udg_" in front of each global variable.
  • Custom script: call SetUnitX(udg_KB_Units[udg_KB_GeneralIntegers[1]], GetLocationX(udg_KB_TempPoint[2]))
  • Custom script: call SetUnitY(udg_KB_Units[udg_KB_GeneralIntegers[1]], GetLocationY(udg_KB_TempPoint[2]))

Edit: Damn Ninjas.
 
Last edited:
Ok I've hit 1 more snag. Whenever a Boss is near the boundary of an Arena, and a unit casts a knockback spell on it, the Boss goes right through the boundary. This must be with the system because the Boss has collision. Is there a way to fix this?
 
KB_TempPoint[2]
use that instead of position of unit, because what you have now leaks. Just make sure you put the condition after that location is set.

Or you could just set another location to the position of the unit at the beginning of the trigger and use that and just remove it at the end of the trigger.
 
Status
Not open for further replies.
Back
Top