• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Hatred Impulse

Hatred Impulse

The hero creates magic sphere which moves to the target point. Having reached a point, the sphere blows up, dealing a damage to enemies, and depriving of their possibility to cast a spell.
Level 1 - 100 damage, 4 seconds silence.
Level 2 - 200 damage, 5 seconds silence.
Level 3 - 300 damage, 6 seconds silence.

  • Hatred Impulse A
    • Events
      • Unit - A unit Starts the effect of an ability (Bad)
    • Conditions
      • (Ability being cast) Equal to Hatred Impulse
    • Actions
      • -------- If variable HI_Switch = 0, means trigger Hatred Impulse B is switched off, and it is necessary for us to turn on it --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HI_Switch Equal to 0
        • Then - Actions
          • Trigger - Turn on Hatred Impulse B <gen>
        • Else - Actions
      • -------- Increasing variable HI_CastNumber, we specify, that one more unit began to use this ability --------
      • Set HI_CastNumber = (HI_CastNumber + 1)
      • -------- Increasing variable HI_Switch, we specify, that trigger Hatred Impulse B began to use one more unit --------
      • Set HI_Switch = (HI_Switch + 1)
      • -------- Changing value of variable HI_Off, whether we define ability for a certain unit is used --------
      • Set HI_Off[HI_CastNumber] = True
      • -------- Let's establish a unit which uses ability --------
      • Set HI_Caster[HI_CastNumber] = (Casting unit)
      • -------- Let's establish position HI_Caster and target point of ability being cast --------
      • Set HI_Point[0] = (Position of HI_Caster[HI_CastNumber])
      • Set HI_Point[1] = (Target point of ability being cast)
      • -------- Let's establish distance between HI_Point [0] and HI_Point [1] --------
      • Set HI_Distance[HI_CastNumber] = (Distance between HI_Point[0] and HI_Point[1])
      • -------- Let's establish angle from HI_Point [0] to HI_Point [1] --------
      • Set HI_Angle[HI_CastNumber] = (Angle from HI_Point[0] to HI_Point[1])
      • -------- HI_Speed Is a variable which value it is possible to change for increase or decrease speed of movement of Effect --------
      • Set HI_Speed[HI_CastNumber] = 8.00
      • -------- Let's create ability Effect --------
      • Unit - Create 1 Effect: Missile for (Owner of HI_Caster[HI_CastNumber]) at HI_Point[0] facing Default building facing degrees
      • Set HI_Missile[HI_CastNumber] = (Last created unit)
      • Animation - Change HI_Missile[HI_CastNumber]'s size to (200.00%, 150.00%, 100.00%) of its original size
      • -------- Removing location to avoid leaks --------
      • Custom script: call RemoveLocation (udg_HI_Point[0])
      • Custom script: call RemoveLocation (udg_HI_Point[1])
  • Hatred Impulse B
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • -------- If variable HI_Off = True That actions will follow --------
      • For each (Integer HI) from 1 to HI_CastNumber, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HI_Off[HI] Equal to True
            • Then - Actions
              • -------- We reduce variable HI_Distance on HI_Speed to approach Effect to target point --------
              • Set HI_Distance[HI] = (HI_Distance[HI] - HI_Speed[HI])
              • -------- We establish a current position then it is moved there itself Effect --------
              • Set HI_Point[2] = (Position of HI_Missile[HI])
              • Set HI_Point[6] = (HI_Point[2] offset by HI_Speed[HI] towards HI_Angle[HI] degrees), facing HI_Angle[HI]
              • Unit - Move HI_Missile[HI] instantly to HI_Point[6]
              • -------- If HI_Distance = 0, the Effect means has reached target point, hence ability has come to the end --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HI_Distance[HI] Less than or equal to 0.00
                • Then - Actions
                  • -------- We get rid from HI_Missile --------
                  • Unit - Add a 0.10 second Generic expiration timer to HI_Missile[HI]
                  • -------- Again we will establish position HI_Missile --------
                  • Set HI_Point[3] = (Position of HI_Missile[HI])
                  • -------- HI_Group Are enemies who to us are necessary for punishing =) --------
                  • Set HI_Group = (Units within 360.00 of HI_Point[3] matching ((((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of HI_Caster[HI])) Equal to True)) and (((Matching un
                  • Unit Group - Pick every unit in HI_Group and do (Actions)
                    • Loop - Actions
                      • -------- We punish --------
                      • Unit - Cause HI_Missile[HI] to damage (Picked unit), dealing (100.00 x (Real((Level of Hatred Impulse for HI_Caster[HI])))) damage of attack type Spells and damage type Normal
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\NightElf\ManaBurn\ManaBurnTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                  • -------- Let's create other Effect which uses ability Nova --------
                  • Unit - Create 1 Effect: Nova Caster for (Owner of HI_Caster[HI]) at HI_Point[3] facing Default building facing degrees
                  • Unit - Add HI: Nova to (Last created unit)
                  • Unit - Order (Last created unit) to Orc Troll Berserker - Berserk
                  • Unit - Add HI: Silence/Slow (Neutral feindlich) to (Last created unit)
                  • Unit - Set level of HI: Silence/Slow (Neutral feindlich) for (Last created unit) to (Level of Hatred Impulse for HI_Caster[HI])
                  • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence HI_Point[3]
                  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                  • -------- Let's establish HI_Off = False, it means that the trigger is not used for HI_Off array --------
                  • Set HI_Off[HI] = False
                  • -------- Let's reduce HI_Switch, it means that this trigger is used now on 1 unit less --------
                  • Set HI_Switch = (HI_Switch - 1)
                  • -------- If HI_Switch = 0, trigger is not used now by any unit, we can turn it off and reset HI_CastNumber --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HI_Switch Equal to 0
                    • Then - Actions
                      • Set HI_CastNumber = 0
                      • Trigger - Turn off Hatred Impulse B <gen>
                    • Else - Actions
                  • -------- Removeing Locations and Group to avoid leaks --------
                  • Custom script: call RemoveLocation (udg_HI_Point[3])
                  • Custom script: call DestroyGroup (udg_HI_Group)
                • Else - Actions
              • Custom script: call RemoveLocation (udg_HI_Point[2])
              • Custom script: call RemoveLocation (udg_HI_Point[6])
            • Else - Actions
  • Hatred Impulse Nova
    • Events
      • Unit - A unit Starts the effect of an ability (Bad)
    • Conditions
      • (Ability being cast) Equal to HI: Nova
    • Actions
      • -------- Let's establish a position of caster --------
      • Set HI_Point[4] = (Position of (Triggering unit))
      • -------- Instead of the Integer we use variable HI_Integer --------
      • For each (Integer HI_Integer) from 1 to 14, do (Actions)
        • Loop - Actions
          • -------- Let's establish a point to which the created Effects will move --------
          • Set HI_Point[5] = (HI_Point[4] offset by 600.00 towards (28.00 x (Real(HI_Integer))) degrees)
          • -------- Let's create Effect for each HI_Integer --------
          • Unit - Create 1 Effect: Missile for (Owner of (Triggering unit)) at HI_Point[4] facing (28.00 x (Real(HI_Integer))) degrees
          • -------- Ordering Effect to move --------
          • Unit - Order (Last created unit) to Move To HI_Point[5]
          • -------- We add expiration timer that the effect has disappeared, on its expiration --------
          • Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
          • -------- It is necessary for additional effect --------
          • Unit - Make (Last created unit) Explode on death
          • Animation - Change (Last created unit)'s size to (150.00%, 150.00%, 100.00%) of its original size
          • -------- Removing location for avoid leaks --------
          • Custom script: call RemoveLocation (udg_HI_Point[5])
      • Custom script: call RemoveLocation (udg_HI_Point[4])
Spell is mui, have no leaks
Thanks Thanathos for Triggers in English

Keywords:
Hatred Impulse
Contents

Hatred Impulse (Map)

Reviews
16:31, 7th Mar 2010 The_Reborn_Devil: The triggering looks ok and the leak is gone. Status: Approved Rating: Useful

Moderator

M

Moderator

16:31, 7th Mar 2010
The_Reborn_Devil:
The triggering looks ok and the leak is gone.


Status: Approved
Rating: Useful
 
Level 9
Joined
Aug 2, 2008
Messages
219
The spell looks good to me. It´s MUI (you´re using indexing instead of hashtables what i find personally better) but i could find a small location leak. The visuals are ok and the idea is avarage. I like the fact that you put a lot of in-code comments in there but i there is no manual which describes how to import this spell.

To come back to the small leak, in Hatred Impulse B you have inlined PolarProjection to move your missile which does leak:
  • Unit - Move HI_Missile[HI] instantly to (HI_Point[2] offset by HI_Speed[HI] towards HI_Angle[HI] degrees), facing HI_Angle[HI] degrees
I guess you know how to fix that so i don´t need to explain this.

All in all the spell is pretty decent, so i gotta say good work.

  • Hatred Impulse A
    • Events
      • Unit - A unit Starts the effect of an ability (Bad)
    • Conditions
      • (Ability being cast) Equal to Hatred Impulse
    • Actions
      • -------- If variable HI_Switch = 0, means trigger Hatred Impulse B is switched off, and it is necessary for us to turn on it --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HI_Switch Equal to 0
        • Then - Actions
          • Trigger - Turn on Hatred Impulse B <gen>
        • Else - Actions
      • -------- Increasing variable HI_CastNumber, we specify, that one more unit began to use this ability --------
      • Set HI_CastNumber = (HI_CastNumber + 1)
      • -------- Increasing variable HI_Switch, we specify, that trigger Hatred Impulse B began to use one more unit --------
      • Set HI_Switch = (HI_Switch + 1)
      • -------- Changing value of variable HI_Off, whether we define ability for a certain unit is used --------
      • Set HI_Off[HI_CastNumber] = True
      • -------- Let's establish a unit which uses ability --------
      • Set HI_Caster[HI_CastNumber] = (Casting unit)
      • -------- Let's establish position HI_Caster and target point of ability being cast --------
      • Set HI_Point[0] = (Position of HI_Caster[HI_CastNumber])
      • Set HI_Point[1] = (Target point of ability being cast)
      • -------- Let's establish distance between HI_Point [0] and HI_Point [1] --------
      • Set HI_Distance[HI_CastNumber] = (Distance between HI_Point[0] and HI_Point[1])
      • -------- Let's establish angle from HI_Point [0] to HI_Point [1] --------
      • Set HI_Angle[HI_CastNumber] = (Angle from HI_Point[0] to HI_Point[1])
      • -------- HI_Speed Is a variable which value it is possible to change for increase or decrease speed of movement of Effect --------
      • Set HI_Speed[HI_CastNumber] = 8.00
      • -------- Let's create ability Effect --------
      • Unit - Create 1 Effect: Missile for (Owner of HI_Caster[HI_CastNumber]) at HI_Point[0] facing Default building facing degrees
      • Set HI_Missile[HI_CastNumber] = (Last created unit)
      • Animation - Change HI_Missile[HI_CastNumber]'s size to (200.00%, 150.00%, 100.00%) of its original size
      • -------- Removing location to avoid leaks --------
      • Custom script: call RemoveLocation (udg_HI_Point[0])
      • Custom script: call RemoveLocation (udg_HI_Point[1])
  • Hatred Impulse B
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • -------- If variable HI_Off = True That actions will follow --------
      • For each (Integer HI) from 1 to HI_CastNumber, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HI_Off[HI] Equal to True
            • Then - Actions
              • -------- We reduce variable HI_Distance on HI_Speed to approach Effect to target point --------
              • Set HI_Distance[HI] = (HI_Distance[HI] - HI_Speed[HI])
              • -------- We establish a current position then it is moved there itself Effect --------
              • Set HI_Point[2] = (Position of HI_Missile[HI])
              • Unit - Move HI_Missile[HI] instantly to (HI_Point[2] offset by HI_Speed[HI] towards HI_Angle[HI] degrees), facing HI_Angle[HI] degrees
              • -------- If HI_Distance = 0, the Effect means has reached target point, hence ability has come to the end --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HI_Distance[HI] Less than or equal to 0.00
                • Then - Actions
                  • -------- We get rid from HI_Missile --------
                  • Unit - Add a 0.10 second Generic expiration timer to HI_Missile[HI]
                  • -------- Again we will establish position HI_Missile --------
                  • Set HI_Point[3] = (Position of HI_Missile[HI])
                  • -------- HI_Group Are enemies who to us are necessary for punishing =) --------
                  • Set HI_Group = (Units within 450.00 of HI_Point[3] matching ((((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of HI_Caster[HI])) Equal to True)) and (((Matching un
                  • Unit Group - Pick every unit in HI_Group and do (Actions)
                    • Loop - Actions
                      • -------- We punish --------
                      • Unit - Cause HI_Missile[HI] to damage (Picked unit), dealing (100.00 x (Real((Level of Hatred Impulse for HI_Caster[HI])))) damage of attack type Spells and damage type Normal
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\NightElf\ManaBurn\ManaBurnTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                  • -------- Let's create other Effect which uses ability Nova --------
                  • Unit - Create 1 Effect: Nova Caster for (Owner of HI_Caster[HI]) at HI_Point[3] facing Default building facing degrees
                  • Unit - Add HI: Nova to (Last created unit)
                  • Unit - Order (Last created unit) to Orc Troll Berserker - Berserk
                  • Unit - Add HI: Silence/Slow (Neutral feindlich) to (Last created unit)
                  • Unit - Set level of HI: Silence/Slow (Neutral feindlich) for (Last created unit) to (Level of Hatred Impulse for HI_Caster[HI])
                  • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence HI_Point[3]
                  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                  • -------- Let's establish HI_Off = False, it means that the trigger is not used for HI_Off array --------
                  • Set HI_Off[HI] = False
                  • -------- Let's reduce HI_Switch, it means that this trigger is used now on 1 unit less --------
                  • Set HI_Switch = (HI_Switch - 1)
                  • -------- If HI_Switch = 0, trigger is not used now by any unit, we can turn it off and reset HI_CastNumber --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HI_Switch Equal to 0
                    • Then - Actions
                      • Set HI_CastNumber = 0
                      • Trigger - Turn off Hatred Impulse B <gen>
                    • Else - Actions
                  • -------- Removeing Locations and Group to avoid leaks --------
                  • Custom script: call RemoveLocation (udg_HI_Point[3])
                  • Custom script: call DestroyGroup (udg_HI_Group)
                • Else - Actions
              • Custom script: call RemoveLocation (udg_HI_Point[2])
            • Else - Actions
  • Hatred Impulse Nova
    • Events
      • Unit - A unit Starts the effect of an ability (Bad)
    • Conditions
      • (Ability being cast) Equal to HI: Nova
    • Actions
      • -------- Let's establish a position of caster --------
      • Set HI_Point[4] = (Position of (Triggering unit))
      • -------- Instead of the Integer we use variable HI_Integer --------
      • For each (Integer HI_Integer) from 1 to 14, do (Actions)
        • Loop - Actions
          • -------- Let's establish a point to which the created Effects will move --------
          • Set HI_Point[5] = (HI_Point[4] offset by 600.00 towards (28.00 x (Real(HI_Integer))) degrees)
          • -------- Let's create Effect for each HI_Integer --------
          • Unit - Create 1 Effect: Missile for (Owner of (Triggering unit)) at HI_Point[4] facing (28.00 x (Real(HI_Integer))) degrees
          • -------- Ordering Effect to move --------
          • Unit - Order (Last created unit) to Move To HI_Point[5]
          • -------- We add expiration timer that the effect has disappeared, on its expiration --------
          • Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
          • -------- It is necessary for additional effect --------
          • Unit - Make (Last created unit) Explode on death
          • Animation - Change (Last created unit)'s size to (150.00%, 150.00%, 100.00%) of its original size
          • -------- Removing location for avoid leaks --------
          • Custom script: call RemoveLocation (udg_HI_Point[5])
      • Custom script: call RemoveLocation (udg_HI_Point[4])
~TNT
 
Level 11
Joined
Jul 2, 2008
Messages
601
MUI. Leakless. Combination of special effects is really decent. Nevertheless, the spell itself isn't such a creative again. :)

I find the casting distance a bit high, cause I can damage units and they don't aggro on me, just stay at their place. Plus the AoE of the dummy ability is a bit high also - if you cast the spell at the same point for the second time - the units which are lighted up like "green" (which means, that they are at area of effect of the spell) don't get any damage/silence.

Also you Buff states: Slow / Silence. But there is no any slow effect as far as there is not any note of it in spell's description :) Fix that

As you see, most of mistakes are Object Editor :p
 
Top