Spellpack SpellPack by PiCk

PiCkstix

New Member
Reaction score
18
Burrower Spell Pack

Abilities: Dig, Impale, Tunnel and Burrow.
MUI / MPI: No, because I was making them for a map that included only one hero for each player and not allowing two of the same.
Import Difficulty: 5/10
Imports Needed: Triggers, Burrower, Abilities and Dummy.

Code:

Dig:
Code:
Dig
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        (Unit-type of (Triggering unit)) Equal to Hole
    Actions
        Set U_Hole = (Triggering unit)
        Set P_Hole = (Position of U_Hole)
        Set B_HoleStats = True

Code:
Move
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Dig 
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                B_HoleStats Equal to False
            Then - Actions
                Set P_Hole = (Position of (Triggering unit))
                Unit - Create 1 Hole for (Owner of (Triggering unit)) at P_Hole facing Default building facing degrees
                Animation - Play (Triggering unit)'s burrow animation
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                B_HoleStats Equal to True
            Then - Actions
                Set P_Hole = (Position of U_Hole)
                Unit - Move (Casting unit) instantly to P_Hole
                Special Effect - Create a special effect at P_Hole using Abilities\Spells\Undead\Impale\ImpaleHitTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Set UG_Hole = (Units within 200.00 of P_Hole matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
                Unit Group - Pick every unit in UG_Hole and do (Actions)
                    Loop - Actions
                        Set P_HoleEffect = (Position of (Picked unit))
                        Special Effect - Create a special effect at P_HoleEffect using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Cause (Triggering unit) to damage (Picked unit), dealing (50.00 + (20.00 x ((Real((Level of Dig  for (Triggering unit)))) - 1.00))) damage of attack type Spells and damage type Normal
                Unit - Kill U_Hole
                Unit - Remove U_Hole from the game
                Animation - Play (Triggering unit)'s unburrow animation
            Else - Actions

Code:
Dies
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Dying unit)) Equal to Hole
    Actions
        Set U_Hole = No unit
        Set P_Hole = (Center of NONE <gen>)
        Set B_HoleStats = False

Impale:
Code:
Impale
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) has buff Impale (2)) Equal to True
    Actions
        Set I_ChanceImpale = (Random integer number between 0 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                I_ChanceImpale Less than or equal to 11
            Then - Actions
                Set P_Impale = (Position of (Attacking unit))
                Unit - Create 1 Dummy for (Owner of (Attacking unit)) at P_Impale facing Default building facing degrees
                Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
                Unit - Set level of Impale  for (Last created unit) to (Level of Impale  for (Attacking unit))
                Set P_Impale = (Position of (Attacked unit))
                Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Impale
                Set I_ChanceImpale = 84
            Else - Actions

Tunnel:
Code:
Tunnel
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Tunnel 
    Actions
        Set P_Tunnel = (Position of (Triggering unit))
        Set R_TunnelAngle = (Facing of (Triggering unit))
        Set U_Tunnel = (Triggering unit)
        Unit - Hide U_Tunnel
        For each (Integer A) from 1 to 9, do (Actions)
            Loop - Actions
                Wait 0.10 seconds
                Set P_Tunnel = (P_Tunnel offset by 110.00 towards R_TunnelAngle degrees)
                Unit - Create 1 Dummy for (Owner of (Triggering unit)) at P_Tunnel facing Default building facing degrees
                Unit - Add a 1.30 second Generic expiration timer to (Last created unit)
                Unit - Set level of Tunnel (Dummy) for (Last created unit) to (Level of Tunnel  for U_Tunnel)
                Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
                Special Effect - Create a special effect at P_Tunnel using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
                Special Effect - Destroy (Last created special effect)
        Wait 0.90 seconds
        Unit - Unhide U_Tunnel
        Unit - Move U_Tunnel instantly to P_Tunnel
        Selection - Select U_Tunnel for (Owner of U_Tunnel)

Burrow:
Code:
BurrowBegin
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Burrow 
    Actions
        Trigger - Turn off (This trigger)
        Trigger - Turn on Burrow <gen>

Code:
Burrow
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Burrow 
    Actions
        Trigger - Turn off (This trigger)
        Set P_Burrow[0] = (Position of (Triggering unit))
        Set P_Burrow[1] = (P_Burrow[0] offset by 40.00 towards 0.00 degrees)
        Set P_Burrow[2] = (P_Burrow[0] offset by 40.00 towards 45.00 degrees)
        Set P_Burrow[3] = (P_Burrow[0] offset by 40.00 towards 90.00 degrees)
        Set P_Burrow[4] = (P_Burrow[0] offset by 40.00 towards 135.00 degrees)
        Set P_Burrow[5] = (P_Burrow[0] offset by 40.00 towards 180.00 degrees)
        Set P_Burrow[6] = (P_Burrow[0] offset by 40.00 towards 225.00 degrees)
        Set P_Burrow[7] = (P_Burrow[0] offset by 40.00 towards 270.00 degrees)
        Set P_Burrow[8] = (P_Burrow[0] offset by 40.00 towards 315.00 degrees)
        -------- - --------
        Set i_Change = 1
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at P_Burrow[i_Change] facing Default building facing degrees
        Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
        Set P_Burrow[i_Change] = (P_Burrow[i_Change] offset by 150.00 towards 0.00 degrees)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Burrow[i_Change]
        -------- - --------
        Set i_Change = 2
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at P_Burrow[i_Change] facing Default building facing degrees
        Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
        Set P_Burrow[i_Change] = (P_Burrow[i_Change] offset by 150.00 towards 45.00 degrees)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Burrow[i_Change]
        -------- - --------
        Set i_Change = 3
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at P_Burrow[i_Change] facing Default building facing degrees
        Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
        Set P_Burrow[i_Change] = (P_Burrow[i_Change] offset by 150.00 towards 90.00 degrees)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Burrow[i_Change]
        -------- - --------
        Set i_Change = 4
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at P_Burrow[i_Change] facing Default building facing degrees
        Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
        Set P_Burrow[i_Change] = (P_Burrow[i_Change] offset by 150.00 towards 135.00 degrees)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Burrow[i_Change]
        -------- - --------
        Set i_Change = 5
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at P_Burrow[i_Change] facing Default building facing degrees
        Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
        Set P_Burrow[i_Change] = (P_Burrow[i_Change] offset by 150.00 towards 180.00 degrees)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Burrow[i_Change]
        -------- - --------
        Set i_Change = 6
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at P_Burrow[i_Change] facing Default building facing degrees
        Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
        Set P_Burrow[i_Change] = (P_Burrow[i_Change] offset by 150.00 towards 225.00 degrees)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Burrow[i_Change]
        -------- - --------
        Set i_Change = 7
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at P_Burrow[i_Change] facing Default building facing degrees
        Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
        Set P_Burrow[i_Change] = (P_Burrow[i_Change] offset by 150.00 towards 270.00 degrees)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Burrow[i_Change]
        -------- - --------
        Set i_Change = 8
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at P_Burrow[i_Change] facing Default building facing degrees
        Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
        Set P_Burrow[i_Change] = (P_Burrow[i_Change] offset by 150.00 towards 315.00 degrees)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale P_Burrow[i_Change]
        -------- - --------
        Wait 1.00 seconds
        Trigger - Turn on BurrowBegin <gen>

Please test the spells, give feedback etc.

Thank You,
PiCk

PS: You might need to use cheats so that you have maximum mana as I didn't edit mana costs that much. :eek:
 

Attachments

  • SpellPack by PiCk.w3x
    269.8 KB · Views: 270

Flare

Stops copies me!
Reaction score
662
Your leaking some points in the Dig triggers. You set points, but you aren't destroying any (from what I can see).

More leaks in Impale trigger. You set P_Impale, then overwrite it, and don't destroy either. 2 leaks everytime you get the impale hit

You can't set a point to itself, offset by X towards Y, and not get leaks. Must be
Code:
Set P1 = (first point)
Set P2 = P2 offset by X towards Y degrees

For Burrow, use a loop, makes everything much simpler. Also, you aren't destroying your points, and arrayed points should NOT be used unless you need them in another trigger (which, in Burrow's case, you don't).


Please fix up the leaks (if you don't know how, search for a memory leak tutorial, there's at least 2)
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I only got to try Burrow before everything bugged like crazy.

1) The "Hole" units hasn't got locust so you can target them.
2) The "Hole" units didn't dissapear when I unburrowed.
3) The hero didn't burrow when I used it the second time.
4) The hero burrowed when I used unburrow the second time from the location when I burrowed the first time.
5) The hero didn't burrow on third cast.
6) The hero permanently burrowed when casting unburrow the third time.
 

Psiblade94122

In need of sleep
Reaction score
138
have you even tested these yourself before submitting?

the tunnel ability is bugged, if there is a "hole" unit nearby, the hero will warp to that unit and wont do much of anything
 

vypur85

Hibernate
Reaction score
803
Use Custom Integer Variable instead:

Code:
        For each [B](Integer A)[/B] from 1 to 9, do (Actions)
            Loop - Actions
                Wait 0.10 seconds
                Set P_Tunnel = (P_Tunnel offset by 110.00 towards R_TunnelAngle degrees)
                Unit - Create 1 Dummy for (Owner of (Triggering unit)) at P_Tunnel facing Default building facing degrees
                Unit - Add a 1.30 second Generic expiration timer to (Last created unit)
                Unit - Set level of Tunnel (Dummy) for (Last created unit) to (Level of Tunnel  for U_Tunnel)
                Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
                Special Effect - Create a special effect at P_Tunnel using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
                Special Effect - Destroy (Last created special effect)
 

PiCkstix

New Member
Reaction score
18
Ok, lets see.
1. I never destroy points, it's a habit.
2. The Hole IS MEANT TO BE TARGETABLE.
3. Yes I have tested them.
4. When I tested it was fine...
5. Thanks for the positive comments.

Oh, and 6. This is from an old unfinished map, so yes, I might have been a noob triggerer then. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top