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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top