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

Explosive Blast

Explosive Blast

A simple ability created in GUI with hashtables. Inspired by Wizard's Explosive Blast from Diablo 3.

There's one trigger to set up the settings and the rest can be left untouched.

What does it do?

Makes the Hero blast explosively several times after a short delay, dealing damage to all enemy ground units around the Hero. Can be cast multiple times in a row, each explode dealing extra damage, but also draining more mana (or however you set the options).

A video preview:

1. Make sure you have "Automatically create unknown variables while pasting trigger data" ticked ON under File -> Preferences... -> General

2. Copy the custom ability Explosive Blast from the Object Editor and paste it you you map.

3. Copy the whole Explosive Blast trigger folder in the Trigger Editor and paste it to your map's triggers.

4. Edit the options as you please.

5. Adjust the conditions on Explosive Blast Targets Allowed trigger to choose which targets will be damaged by the spell.

6. Make sure the condition of Explosive Blast Cast has the correct ability (the one you copied from this map).

7. Add Explosive Blast to any unit and you're done!


  • -------- ------------------------------------------------------------------------------------------ --------
  • -------- ------------------ EXPLOSIVE BLAST SETUP ------------------------- --------
  • -------- ------------------------------------------------------------------------------------------ --------
  • -------- Hashtable (Don't touch this) --------
  • Hashtable - Create a hashtable
  • Set ExplosiveBlastTable = (Last created hashtable)
  • -------- ------------------------------------------------------------------------------------------ --------
  • -------- ------------------------------------------------------------------------------ --------
  • -------- DAMAGE --------
  • -------- Damage: determines the amount of damage EACH BLAST does. --------
  • -------- (Base + (PerLvl x Level of ability) + (PerCast x Casts in a row)) --------
  • Set ExplosiveBlast_DamageBase = 3.00
  • Set ExplosiveBlast_DamagePerLvl = 2.00
  • Set ExplosiveBlast_DamagePerCast = 1.00
  • -------- ------------------------------------------------------------------------------ --------
  • -------- Attack type: the type of damage the spell deals. Spells typically deal SPELL damage. Magic Immunity will protect from spell damage. --------
  • Set ExplosiveBlast_AttackType = Spells
  • -------- ------------------------------------------------------------------------------ --------
  • -------- MANA COST --------
  • -------- Mana Cost: EACH BLAST drains this amount of mana. --------
  • -------- (Base + (PerLvl x Level of ability) + (PerCast x Casts in a row)) --------
  • Set ExplosiveBlast_ManaCostBase = 4.00
  • Set ExplosiveBlast_ManaCostPerLvl = 3.00
  • Set ExplosiveBlast_ManaCostPerCast = 2.00
  • -------- ------------------------------------------------------------------------------ --------
  • -------- BLAST SETTINGS --------
  • -------- Blasts: number of explosions per cast. --------
  • -------- (Base + (PerLvl x Level of ability)) --------
  • Set ExplosiveBlast_BlastsBase = 2
  • Set ExplosiveBlast_BlastsPerLvl = 1
  • -------- ------------------------------------------------------------------------------ --------
  • -------- Blasts increment: how many explosions are added after the first cast, if the ability is cast consecutively. --------
  • -------- (Inc + (PerLvl x Level of ability)) --------
  • -------- (Leave both as 0, if you want to use the same calculation as above for all casts) --------
  • Set ExplosiveBlast_BlastsInc = 0
  • Set ExplosiveBlast_BlastsIncPerLvl = 0
  • -------- ------------------------------------------------------------------------------ --------
  • -------- Blast Interval: determines the time between each blast. --------
  • -------- (1.00 is one second) --------
  • Set ExplosiveBlast_BlastInterval = 1.00
  • -------- ------------------------------------------------------------------------------ --------
  • -------- Blast Delay: the amount of time before the first blast. --------
  • -------- (1.00 is one second) --------
  • Set ExplosiveBlast_Delay = 3.00
  • -------- ------------------------------------------------------------------------------ --------
  • -------- Reset delay: whether the delay starts again every time the spell is cast consecutively. --------
  • Set ExplosiveBlast_ResetDelay = True
  • -------- ------------------------------------------------------------------------------ --------
  • -------- Casts Max: the maximum amount of consecutive casts in a row. --------
  • Set ExplosiveBlast_CastsMax = 3
  • -------- ------------------------------------------------------------------------------ --------
  • -------- RANGE --------
  • -------- Radius: the range of how far the blasts will damage enemies. --------
  • -------- (Base + (PerLvl x Level of ability)) --------
  • Set ExplosiveBlast_RadiusBase = 300.00
  • Set ExplosiveBlast_RadiusPerLvl = 25.00
  • -------- ------------------------------------------------------------------------------ --------
  • -------- SPECIAL EFFECTS --------
  • -------- SFX: the special effects used for each event. CAST is shown when the ability is cast. ACTIVE is created when the ability is cast, but lasts the whole --------
  • -------- time the ability is active. BLAST is the effect of the explosion and NOMANA is shown when the Hero doesn't have enough mana. --------
  • Set ExplosiveBlast_SFXcast = Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl
  • Set ExplosiveBlast_SFXactive = Environment\SmallBuildingFire\SmallBuildingFire2.mdl
  • Set ExplosiveBlast_SFXblast = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
  • Set ExplosiveBlast_SFXnomana = Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
  • -------- SCALE sets the size of the special effect of the blast. --------
  • -------- (1.00 = 100%) --------
  • Set ExplosiveBlast_SFXblastScale = 1.00
  • -------- ------------------------------------------------------------------------------ --------
  • Explosive Blast Targets Allowed
    • Events
    • Conditions
      • (AttackedUnit is alive) Equal to True
      • (AttackedUnit is A flying unit) Not equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (AttackedUnit belongs to an enemy of (Owner of CastingUnit)) Equal to True
          • (Owner of AttackedUnit) Equal to Neutral Passive
    • Actions
      • -------- ^ On the conditions above, set the targets you want to be damaged by the Explosive Blast --------
      • -------- !! AttackedUnit = the unit that is being damaged !! --------
      • -------- !! CastingUnit = the Hero casting the ability !! --------
      • -------- --------------------------------------------------------------------------------------------------------------- --------
      • -------- --------------------------------------------------------------------------------------------------------------- --------
      • -------- --------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------- Do not touch the code below, unless you know what you're doing ----------- --------
      • -------- --------------------------------------------------------------------------------------------------------------- --------
      • Unit - Cause CastingUnit to damage AttackedUnit, dealing (ExplosiveBlast_DamageBase + ((ExplosiveBlast_DamagePerLvl x (Real((Level of Explosive Blast for CastingUnit)))) + (ExplosiveBlast_DamagePerCast x (Real((Load (Key casts) of (Key TempHandle) from ExplosiveBlastTable)))))) damage of attack type Spells and damage type Normal
      • -------- --------------------------------------------------------------------------------------------------------------- --------
  • Explosive Blast Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Explosive Blast
    • Actions
      • Set CastingUnit = (Triggering unit)
      • Set TempHandle = (Triggering unit)
      • Set ExplosiveBlast_Casts = (Load (Key casts) of (Key TempHandle) from ExplosiveBlastTable)
      • Set ExplosiveBlast_CurrentlyActive = (Load (Key currentlyActive) of (Key TempHandle) from ExplosiveBlastTable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ExplosiveBlast_Casts Less than ExplosiveBlast_CastsMax
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ExplosiveBlast_ResetDelay Equal to True
            • Then - Actions
              • Hashtable - Save ExplosiveBlast_Delay as (Key delay) of (Key TempHandle) in ExplosiveBlastTable
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ExplosiveBlast_CurrentlyActive Equal to False
                • Then - Actions
                  • Hashtable - Save ExplosiveBlast_Delay as (Key delay) of (Key TempHandle) in ExplosiveBlastTable
                • Else - Actions
          • Hashtable - Save (ExplosiveBlast_Casts + 1) as (Key casts) of (Key TempHandle) in ExplosiveBlastTable
          • Set ExplosiveBlast_TempExplosions = (Load (Key explosions) of (Key TempHandle) from ExplosiveBlastTable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ExplosiveBlast_BlastsInc + ExplosiveBlast_BlastsIncPerLvl) Greater than 0
              • ExplosiveBlast_CurrentlyActive Equal to True
            • Then - Actions
              • Hashtable - Save (ExplosiveBlast_BlastsInc + ((ExplosiveBlast_BlastsIncPerLvl x (Level of Explosive Blast for CastingUnit)) + ExplosiveBlast_TempExplosions)) as (Key explosions) of (Key TempHandle) in ExplosiveBlastTable
            • Else - Actions
              • Hashtable - Save (ExplosiveBlast_BlastsBase + ((ExplosiveBlast_BlastsPerLvl x (Level of Explosive Blast for CastingUnit)) + ExplosiveBlast_TempExplosions)) as (Key explosions) of (Key TempHandle) in ExplosiveBlastTable
          • Special Effect - Create a special effect attached to the origin of CastingUnit using ExplosiveBlast_SFXcast
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Destroy (Load (Key castSFX) of (Key TempHandle) in ExplosiveBlastTable)
          • Special Effect - Create a special effect attached to the chest of CastingUnit using ExplosiveBlast_SFXactive
          • Hashtable - Save Handle Of(Last created special effect) as (Key castSFX) of (Key TempHandle) in ExplosiveBlastTable
          • Unit Group - Add CastingUnit to ExplosiveBlastGroup
        • Else - Actions
  • Explosive Blast Periodic
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ExplosiveBlastGroup and do (Actions)
        • Loop - Actions
          • Set CastingUnit = (Picked unit)
          • Set TempHandle = (Picked unit)
          • Set ExplosiveBlast_TempDelay = (Load (Key delay) of (Key TempHandle) from ExplosiveBlastTable)
          • Set ExplosiveBlast_Explosions = (Load (Key explosions) of (Key TempHandle) from ExplosiveBlastTable)
          • Hashtable - Save True as (Key currentlyActive) of (Key TempHandle) in ExplosiveBlastTable
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ExplosiveBlast_TempDelay Greater than 0.00
            • Then - Actions
              • Hashtable - Save (ExplosiveBlast_TempDelay - 0.10) as (Key delay) of (Key TempHandle) in ExplosiveBlastTable
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ExplosiveBlast_Explosions Greater than 0
                • Then - Actions
                  • Hashtable - Save (ExplosiveBlast_Explosions - 1) as (Key explosions) of (Key TempHandle) in ExplosiveBlastTable
                  • Hashtable - Save ExplosiveBlast_BlastInterval as (Key delay) of (Key TempHandle) in ExplosiveBlastTable
                  • Set ExplosiveBlast_TempManaCost = (ExplosiveBlast_ManaCostBase + ((ExplosiveBlast_ManaCostPerLvl x (Real((Level of Explosive Blast for CastingUnit)))) + (ExplosiveBlast_ManaCostPerCast x (Real((Load (Key casts) of (Key TempHandle) from ExplosiveBlastTable))))))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of CastingUnit) Greater than or equal to ExplosiveBlast_TempManaCost
                    • Then - Actions
                      • Unit - Set mana of CastingUnit to ((Mana of CastingUnit) - ExplosiveBlast_TempManaCost)
                      • Set TempPoint = (Position of CastingUnit)
                      • Special Effect - Create a special effect at TempPoint using ExplosiveBlast_SFXblast
                      • Special Effect - Set Scale of (Last created special effect) to ExplosiveBlast_SFXblastScale
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in (Units within (ExplosiveBlast_RadiusBase + (ExplosiveBlast_RadiusPerLvl x (Real((Level of Explosive Blast for CastingUnit))))) of TempPoint) and do (Actions)
                        • Loop - Actions
                          • Set AttackedUnit = (Picked unit)
                          • Trigger - Run Explosive Blast Targets Allowed <gen> (checking conditions)
                      • Custom script: call RemoveLocation(udg_TempPoint)
                    • Else - Actions
                      • Special Effect - Create a special effect attached to the origin of CastingUnit using ExplosiveBlast_SFXnomana
                      • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Special Effect - Destroy (Load (Key castSFX) of (Key TempHandle) in ExplosiveBlastTable)
                  • Unit Group - Remove CastingUnit from ExplosiveBlastGroup
                  • Hashtable - Clear all child hashtables of child (Key TempHandle) in ExplosiveBlastTable
Version 1.3
- Added options:
* Attack type
* Blasts increment - consecutive casts can now add different amount of blasts
* Reset delay - a consecutive cast does not need to reset the starting delay
* Blast SFX scale - the size of the blast's Special Effect is now adjustable​

- Bug fixes:
* Mana cost is now calculated correctly​
Contents

Explosive Blast (Map)

Reviews
MyPad
A simple, straightforward spell that does its' job clearing creep waves. Approved

Review:

  • At a glance, a lot of triggering unit function calls were made in the Explosive Blast Cast trigger. Assigning a variable to the triggering unit and referring to that variable would be recommended.

  • Additional filters for targeting the desired targets are lacking.
It is in good faith that the bundle will be updated to address these things. For now, this will be moved to Awaiting Update
 
Level 9
Joined
Jul 30, 2018
Messages
445
Updated!

I moved the damage function to its own trigger, so people can now change the targets in that trigger's conditions. Don't know if that's the most clever way, but feel free to suggest if there's a better one! Also made the suggested changes to the Cast trigger.
 
Last edited:
Level 8
Joined
May 21, 2019
Messages
435
Impressively thorough showcase and guide.
The ability itself deviates enough from the standard abilities to be considered original, and the use of the ability is quite interactive.
 
Level 9
Joined
Jul 30, 2018
Messages
445
Updated with the inspiration of Reforged coming.

Version 1.3 changelog:
- Added options:
* Attack type
* Blasts increment - consecutive casts can now add different amount of blasts
* Reset delay - a consecutive cast does not need to reset the starting delay
* Blast SFX scale - the size of the blast's Special Effect is now adjustable​

- Bug fixes:
* Mana cost is now calculated correctly​
 
Last edited:
Top