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

Laserdude's Explosive Spell Pack V 1.10

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This is my Explosive spell pack, which I made because my Triggered Explosive spell was rejected due to the fact that it was too small, so since I had more ideas for spells, I decided to make a spell pack! Enjoy!

-Plant C4-
Plants an invisible bomb at targeted point which will remain there untill it is killed or untill you decide to trigger it to explode.

-Wall of Explosives-
Creates a row of explosives in targeted direction which will explode after 3 seconds or when any of the explosives is destroyed.

-Path of Explosives-
Makes the hero drop explosives after a certain time interval which will explode after one second and drain mana untill deactivated.

-Nuke-
Marks a target for a Nuke, which will land after 10 seconds, dealing 1000 damage to all targets within the area. The nuke will be interrupted if the caster dies.


I will link all the triggers in a comment below, atleast for now, and copy it into this description some other time when I am updating this spell.

Enjoy! Rate and Comment!

CHANGELOG:
V 1.10 - Major bug and leak fixes.

Keywords:
Triggered, Explosive, Laserdude, Pack, Exlosives, Kaboom, Boom, Nuke, Wall, Path, Immolation, Effect, Epic, Mega.
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: Too long time as NeedsFix. Rejected. 13:24, 25th Feb 2011 Bribe: Nuke colour trigger: (Number of units in (Units of type Nuke Target)) Equal to 0 This leaks the unit group. You need a "set bj_wantDestroyGroup = true"...

Moderator

M

Moderator

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

13:24, 25th Feb 2011
Bribe: Nuke colour trigger:

(Number of units in (Units of type Nuke Target)) Equal to 0

This leaks the unit group. You need a "set bj_wantDestroyGroup = true" custom script right before that line.
 
Level 8
Joined
Jun 30, 2010
Messages
259
  • Plant C4
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Plant C4
    • Actions
      • Set MUI = (MUI + 1)
      • Set C4Point = (Target point of ability being cast)
      • Unit - Set the custom value of (Triggering unit) to MUI
      • Hashtable - Save (Custom value of (Triggering unit)) as (Key C4Number) of (Key (Triggering unit)) in (Last created hashtable)
      • Set Debug_C4[(Custom value of (Triggering unit))] = True
      • Unit - Create 1 C4 for (Owner of (Triggering unit)) at C4Point facing Default building facing degrees
      • Unit - Set level of Explode for (Last created unit) to (Level of Plant C4 for (Triggering unit))
      • Set C4[MUI] = (Last created unit)
      • Set AbilityLevel[MUI] = (Level of Plant C4 for (Triggering unit))
      • Unit - Remove Plant C4 from (Triggering unit)
      • Unit - Add Explode C4 to (Triggering unit)
  • C4 Explode
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Explode C4
    • Actions
      • Set Debug_C4[(Load (Key C4Number) of (Key (Triggering unit)) from (Last created hashtable))] = False
      • Set MUI = (MUI - 1)
      • Special Effect - Create a special effect attached to the origin of C4[(Load (Key C4Number) of (Key (Triggering unit)) from Hashtablez)] using Abilities\Spells\Other\Doom\DoomDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of C4[(Load (Key C4Number) of (Key (Triggering unit)) from Hashtablez)] using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Kill C4[(Custom value of (Triggering unit))]
      • Unit - Remove Explode C4 from (Triggering unit)
      • Unit - Add Plant C4 to (Triggering unit)
      • Unit - Set level of Plant C4 for (Triggering unit) to AbilityLevel[(Load (Key C4Number) of (Key (Triggering unit)) from (Last created hashtable))]

  • Wall of Explosives
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wall of Explosives
    • Actions
      • Set Wallunitpoint = (Position of (Triggering unit))
      • Set Wallcastpoint = (Target point of ability being cast)
      • Set Casting_Degrees = (Angle from Wallunitpoint to Wallcastpoint)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set WallReal = (WallReal + 50.00)
          • Unit - Create 1 Explosives for (Owner of (Triggering unit)) at (Wallunitpoint offset by WallReal towards Casting_Degrees degrees) facing Default building facing degrees
          • Unit - Set level of Wall Explode for (Last created unit) to (Level of Wall of Explosives for (Triggering unit))
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Set WallReal = 0.00
  • Path of Explosives
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Path of Explosives (Turnon)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Path of Explosives (Turnon) for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit Group - Add (Triggering unit) to PathUnits[1]
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Path of Explosives (Turnon) for (Triggering unit)) Equal to 2
            • Then - Actions
              • Unit Group - Add (Triggering unit) to PathUnits[2]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Path of Explosives (Turnon) for (Triggering unit)) Equal to 3
                • Then - Actions
                  • Unit Group - Add (Triggering unit) to PathUnits[3]
                • Else - Actions
      • Unit - Add Path of Explosives (Turnoff) to (Triggering unit)
      • Unit - Set level of Path of Explosives (Turnoff) for (Triggering unit) to (Level of Path of Explosives (Turnon) for (Triggering unit))
      • Unit - Remove Path of Explosives (Turnon) from (Triggering unit)
  • Path of Explosives Turnoff
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Path of Explosives (Turnoff)
    • Actions
      • Unit Group - Remove (Triggering unit) from PathUnits[1]
      • Unit Group - Remove (Triggering unit) from PathUnits[2]
      • Unit Group - Remove (Triggering unit) from PathUnits[3]
      • Unit - Add Path of Explosives (Turnon) to (Triggering unit)
      • Unit - Set level of Path of Explosives (Turnon) for (Triggering unit) to (Level of Path of Explosives (Turnoff) for (Triggering unit))
      • Unit - Remove Path of Explosives (Turnoff) from (Triggering unit)
  • Explosive Drop 1
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in PathUnits[1]) Equal to 0
        • Then - Actions
        • Else - Actions
          • Unit Group - Pick every unit in PathUnits[1] and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Explosives (Path) for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 10.00)
  • Explosive Drop 2
    • Events
      • Time - Every 0.75 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in PathUnits[2]) Equal to 0
        • Then - Actions
        • Else - Actions
          • Unit Group - Pick every unit in PathUnits[2] and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Explosives (Path) for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 7.50)
  • Explosive Drop 3
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in PathUnits[3]) Equal to 0
        • Then - Actions
        • Else - Actions
          • Unit Group - Pick every unit in PathUnits[3] and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Explosives (Path) for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 5.00)
  • Nuke
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Nuke
    • Actions
      • Set NukeNumber = (NukeNumber + 1)
      • Unit - Create 1 Nuke Target for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
      • Set NukeTargets[NukeNumber] = (Last created unit)
      • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
      • Game - Display to (All players) the text: NUCLEAR LAUNCH DETE...
      • Cinematic - Ping minimap for (All players) at (Target point of ability being cast) for 3.00 seconds, using a Warning ping of color (100.00%, 100.00%, 100.00%)
      • Sound - Play Warning <gen>
      • Hashtable - Create a hashtable
      • Set Hashtablez = (Last created hashtable)
      • Hashtable - Save Handle Of(Triggering unit) as NukeNumber of (Player number of (Owner of (Triggering unit))) in (Last created hashtable)
  • Nuke Explode
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Nuke Target
      • ((Load NukeNumber of (Player number of (Owner of (Dying unit))) in Hashtablez) is alive) Equal to True
    • Actions
      • Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\NightElf\Starfall\StarfallTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Cinematic - Fade out and back in over 1.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Unit - Cause (Dying unit) to damage circular area after 0.50 seconds of radius 1000.00 at (Position of (Dying unit)), dealing 1000.00 damage of attack type Chaos and damage type Normal
      • Sound - Play Incinerate1 <gen>
      • Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at (Position of (Dying unit)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
  • Nuke Colour
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RedTarget Equal to True
        • Then - Actions
          • For each (Integer A) from 1 to NukeNumber, do (Actions)
            • Loop - Actions
              • Animation - Change NukeTargets[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
          • Set RedTarget = False
        • Else - Actions
          • For each (Integer A) from 1 to NukeNumber, do (Actions)
            • Loop - Actions
              • Animation - Change NukeTargets[(Integer A)]'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
          • Set RedTarget = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units of type Nuke Target)) Equal to 0
        • Then - Actions
          • Set NukeNumber = 0
        • Else - Actions
  • Debug C4
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Plant C4
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Debug_C4[(Custom value of (Triggering unit))] Equal to True
        • Then - Actions
          • Unit - Remove Plant C4 from (Triggering unit)
          • Hero - Modify unspent skill points of (Triggering unit): Add 1 points
        • Else - Actions
  • Debug Path of Explosives
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Path of Explosives (Turnon)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ((Triggering unit) is in PathUnits[1]) Equal to True
              • ((Triggering unit) is in PathUnits[2]) Equal to True
              • ((Triggering unit) is in PathUnits[3]) Equal to True
        • Then - Actions
          • Unit - Remove Path of Explosives (Turnon) from (Triggering unit)
          • Hero - Modify unspent skill points of (Triggering unit): Add 1 points
        • Else - Actions
Here is the full list of spells, with the including updates! Enjoy!
 
Last edited:
• Plant C4: It is recommended that you do not use custom values. If another spell or system uses custom values for units, your spell will stop being functional. You leak a point.

• C4 Explode: Same as Plant C4.

• Wall of Explosives: Many leaks. Instead of doing that huge trigger, you could make these simple actions:
  • Wall of Explosives
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wall of Explosives
    • Actions
      • Custom script: local real r = 50
      • Custom script: local real x = GetUnitX (GetTriggerUnit())
      • Custom script: local real y = GetUnitY (GetTriggerUnit())
      • Custom script: local real x1 = GetSpellTargetX()
      • Custom script: local real y1 = GetSpellTargetY()
      • Custom script: local unit u
      • Custom script: local real a = Atan2 (y1-y, x1 - x)
      • Custom script: loop
      • Custom script: exitwhen r == 500
      • Custom script: set u = CreateUnit (GetOwningPlayer (GetTriggerUnit()), 'n000', x + r * Cos(a), y + r * Sin(a), 0)
      • Custom script: call UnitApplyTimedLife (u, 'BTLF', 3)
      • Custom script: set r = r + 50
      • Custom script: endloop
      • Custom script: set u = null
• Periodic events: you never turn off the triggers with periodic events, causing lag to appear after some game period. Fix it; check if there are no instances of the respective ability and turn off the trigger responding to that ability.

First step; visit this thread: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 8
Joined
Jun 30, 2010
Messages
259
• Plant C4: It is recommended that you do not use custom values. If another spell or system uses custom values for units, your spell will stop being functional. You leak a point.

• C4 Explode: Same as Plant C4.

• Wall of Explosives: Many leaks. Instead of doing that huge trigger, you could make these simple actions:
  • Wall of Explosives
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wall of Explosives
    • Actions
      • Custom script: local real r = 50
      • Custom script: local real x = GetUnitX (GetTriggerUnit())
      • Custom script: local real y = GetUnitY (GetTriggerUnit())
      • Custom script: local real x1 = GetSpellTargetX()
      • Custom script: local real y1 = GetSpellTargetY()
      • Custom script: local unit u
      • Custom script: local real a = Atan2 (y1-y, x1 - x)
      • Custom script: loop
      • Custom script: exitwhen r == 500
      • Custom script: set u = CreateUnit (GetOwningPlayer (GetTriggerUnit()), 'n000', x + r * Cos(a), y + r * Sin(a), 0)
      • Custom script: call UnitApplyTimedLife (u, 'BTLF', 3)
      • Custom script: set r = r + 50
      • Custom script: endloop
      • Custom script: set u = null
• Periodic events: you never turn off the triggers with periodic events, causing lag to appear after some game period. Fix it; check if there are no instances of the respective ability and turn off the trigger responding to that ability.

First step; visit this thread: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
Thanks for the feedback! I will try to fix the periodic events, but I really need to get more into Custom scripts, as the only thing I use them for atm is to remove leaks such as unit groups (does not leak in this spell becuase it is set before the action occurs). If it is possible to make in GUI, can you make a simplified trigger to show a small part of what you mean? It would make it alot easier because as mentioned, I don't understand fully what you mean with all those custom scripts (allthought I understand some of it) And when it comes to the custom values, I think it should be pretty easy to remove them using Hashtables, which I think would work, and if it doesn't, I will probably find a way to fix it, but, as mentioned in the spell description in reply 1 to this post, I don't have the time right now, hopefully I will have time sometime in the weekend.
 
In order for raw GUI to work with the trigger I posted, you need a real variable with array and an indexing system to support it, so that the real increases by 50, without other instances muddling. Basically, a real value increases by 50, so that you have a different offset everytime the loop ends, forcing your actions to take place within a loop, to avoid using them repeatedly. Since that would require indexing, I used local reals, which are created once per cast and totally do the work just fine. :]
 
Level 8
Joined
Jun 30, 2010
Messages
259
In order for raw GUI to work with the trigger I posted, you need a real variable with array and an indexing system to support it, so that the real increases by 50, without other instances muddling. Basically, a real value increases by 50, so that you have a different offset everytime the loop ends, forcing your actions to take place within a loop, to avoid using them repeatedly. Since that would require indexing, I used local reals, which are created once per cast and totally do the work just fine. :]

and this is made to avoid leaks and to make the trigger lag more, not actually fix something that would crash the game that uses the trigger, right?
 
Top