• 🏆 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!

Pulverize v1.00

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
A (literaly) groundbreaking spell Pulverize.

Slams ground, sending all nearby enemies into air. By slaming a to ground they cause small area damage and stun caster's enemies

Give credits if you use this spell in your map.


  • Pulverize Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pulverize
    • Actions
      • -------- Stores Caster into variable and finds it's position --------
      • Set Caster = (Triggering unit)
      • Set Point = (Position of Caster)
      • -------- Sets AoE of the Knock Up --------
      • -------- NOTE 1: Set your AoE here, and dont forget to change the main spell's AoE too. --------
      • Set AoE = 400.00
      • -------- Finds all enemies nearby and counts them --------
      • -------- NOTE 2: Enumerates all enemy ground units within the given AoE above the enumeration --------
      • Set Enemies = (Units within AoE of Point matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is dead) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of Caster)
      • Set LoopNumber = (Number of units in Enemies)
      • -------- Sets speed of knockup and how fast it reduces, making it slowly stop rising and start falling faster and faster --------
      • -------- NOTE 3: Set your Gravity and knockup speeds here --------
      • -------- NOTE 4: At given parameters, the knockup lasts 2 seconds. --------
      • Set KnockSpeed = 50.00
      • Set GravitySpeed = 1.50
      • -------- Clears variable for Knockup distance --------
      • Set KnockoutDistance = 0.00
      • -------- Finds the level of spell being cast --------
      • Set SpellLevel = (Level of Pulverize for Caster)
      • -------- Creates a dummy unit and stores all information into hashtable --------
      • -------- NOTE 5: All information is attached to the Dummy unit --------
      • Unit - Create 1 Dummy Caster for (Owner of Caster) at Point facing Default building facing degrees
      • Set HandleID = (Key (Last created unit))
      • Hashtable - Save Handle OfCaster as 0 of HandleID in (Last created hashtable)
      • Hashtable - Save LoopNumber as 1 of HandleID in Hashtable
      • Hashtable - Save KnockSpeed as 2 of HandleID in Hashtable
      • Hashtable - Save KnockoutDistance as 3 of HandleID in Hashtable
      • Hashtable - Save GravitySpeed as 4 of HandleID in Hashtable
      • Hashtable - Save SpellLevel as 5 of HandleID in Hashtable
      • Set LoopNumber = 5
      • Unit Group - Pick every unit in Enemies and do (Actions)
        • Loop - Actions
          • Set LoopNumber = (LoopNumber + 1)
          • Hashtable - Save Handle Of(Picked unit) as LoopNumber of HandleID in Hashtable
          • Unit - Add Storm Crow Form to (Picked unit)
          • Unit - Remove Storm Crow Form from (Picked unit)
          • Unit - Pause (Picked unit)
      • -------- Checks if there is any instance of spell in effect. If not, turns knockup trigger on --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Airbornes is empty) Equal to True
        • Then - Actions
          • Trigger - Turn on Pulverize Knockback <gen>
        • Else - Actions
      • -------- Adds dummy unit to Dummy units' group --------
      • Unit Group - Add (Last created unit) to Airbornes
      • -------- Clears leaks --------
      • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call DestroyGroup(udg_Enemies)
  • Pulverize Knockback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Airbornes and do (Actions)
        • Loop - Actions
          • -------- Finds handle ID of the Dummy unit --------
          • Set HandleID = (Key (Picked unit))
          • -------- Loads the number of units knocked up --------
          • Set LoopNumber = (Load 1 of HandleID from Hashtable)
          • -------- Loads knockup speed and distance --------
          • Set KnockSpeed = (Load 2 of HandleID from Hashtable)
          • Set KnockoutDistance = (Load 3 of HandleID from Hashtable)
          • -------- Does the maths and checks if it is time to finish the knockup --------
          • Set KnockoutDistance = (KnockoutDistance + KnockSpeed)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KnockoutDistance Less than or equal to 0.00
            • Then - Actions
              • -------- If it is... --------
              • -------- Loads the Caster and level of the Spell cast --------
              • Set Caster = (Load 0 of HandleID in Hashtable)
              • Set SpellLevel = (Load 5 of HandleID from Hashtable)
              • -------- Restores units knocked up and does the 'slam' effect --------
              • -------- NOTE 1: Change the damage and aoe of the slam at Object editor, Spell Pulverize Slam --------
              • For each (Integer LoopVariable) from 1 to LoopNumber, do (Actions)
                • Loop - Actions
                  • Set Target = (Load (LoopVariable + 5) of HandleID in Hashtable)
                  • Set Point = (Position of Target)
                  • Animation - Change Target flying height to (Default flying height of Target) at 0.00
                  • Unit - Create 1 Dummy Caster for (Owner of Caster) at Point facing Default building facing degrees
                  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                  • Unit - Add Pulverize Slam to (Last created unit)
                  • Unit - Set level of Pulverize Slam for (Last created unit) to SpellLevel
                  • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
                  • Unit - Unpause Target
                  • Custom script: call RemoveLocation(udg_Point)
              • -------- Removes Dummy unit from dummy units' group --------
              • Unit Group - Remove (Picked unit) from Airbornes
              • -------- Checks if there is any instance of spell still in effect. If not, turns this trigger off --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Airbornes is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
              • -------- Clears the hashtable on Dummy's account and removes it from the game --------
              • Hashtable - Clear all child hashtables of child HandleID in Hashtable
              • Unit - Remove (Picked unit) from the game
              • -------- Clears the leak --------
              • Custom script: call RemoveLocation(udg_Point)
            • Else - Actions
              • -------- Does the knockup/falling --------
              • Set GravitySpeed = (Load 4 of HandleID from Hashtable)
              • Set KnockSpeed = (KnockSpeed - GravitySpeed)
              • For each (Integer LoopVariable) from 1 to LoopNumber, do (Actions)
                • Loop - Actions
                  • Set Target = (Load (LoopVariable + 5) of HandleID in Hashtable)
                  • Animation - Change Target flying height to ((Current flying height of Target) + KnockSpeed) at 0.00
              • Hashtable - Save KnockSpeed as 2 of HandleID in Hashtable
              • Hashtable - Save KnockoutDistance as 3 of HandleID in Hashtable


v1.00 - First Released


Keywords:
groundbreaking, slam, stomp, knock, up
Contents

Pulverize v1.00 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 22:19, 19th Aug 2011 Pharaoh_: The spell itself is not really creative, but it can be a nice sample for triggering newbies. • Animation - Change Target flying height to (Default flying...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

22:19, 19th Aug 2011
Pharaoh_:
The spell itself is not really creative, but it can be a nice sample for triggering newbies.

  • Animation - Change Target flying height to (Default flying height of Target) at 0.00
Remove (Default flying height); this skill targets ground units only, of which the fly height will always be 0. This creates a redundant function call; change it to 0.

• Owner of Caster in the Pulverize Cast trigger can be (Triggering player); it in fact procs faster.

• There is an issue that units do not always get damaged; I would advise you to damage them with triggering, because damage should be configurable (and not via the Object Editor). Someone might want to damage the units for Caster's ((Strength + Agility) / 2), for example. Also, use Channel as the base ability and trigger the effects (make them configurable as well).

• In the Pulverize Knockback trigger, you remove the "Point" variable twice; the second removal is not needed, since you don't declare it (it's after the Remove (Picked unit) from the game action).

Everything else looks fine.
 
  • Unit Group - Pick every unit in Enemies and do (Actions)
  • Loop - Actions
  • Set LoopNumber = (LoopNumber + 1)
  • Hashtable - Save Handle Of(Picked unit) as LoopNumber of HandleID in Hashtable
  • Unit - Add Storm Crow Form to (Picked unit)
  • Unit - Remove Storm Crow Form from (Picked unit)
  • Unit - Pause (Picked unit)
You should store (Picked Unit) in a variable so you dont repeat the same function call again and again

Also, you shouldn't add the ability and remove it like that

Use these custom scripts instead:

  • Custom script: if UnitAddAbility(udg_YourUnit,'Arav') then
  • Custom script: call UnitRemoveAbility(udg_YourUnit,'Arav')
  • Custom script: endif
Oh and you should also use variables to reduce function calls in other places too..
 
Top