System Impale System

Angel_Island

Much long, many time, wow
Reaction score
56
While playing with impale, I got really annoyed by not being able to impale enemies again when they are stuned or in the air. So I made this system.

Code:
Trigger:
  • Impale System Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Set ImpaleRange to how long you want the impale to be --------
      • Set ImpaleRange = 600.00
      • -------- This is how much space there will be between every spikes. The amount of spike spawned is (ImpaleRange/ImpaleSpace) --------
      • Set ImpaleSpace = 150.00
      • -------- Set ImpaleAoE to how big AoE you want the impale to have --------
      • Set ImpaleAoE = 175.00

Trigger:
  • Impale System Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Burrowstrike
          • (Ability being cast) Equal to Impale (Triggered)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ImpaleInstances Equal to 1000
        • Then - Actions
          • Set ImpaleInstances = 1
        • Else - Actions
          • Set ImpaleInstances = (ImpaleInstances + 1)
      • Set ImpaleCaster[ImpaleInstances] = (Triggering unit)
      • Set ImpaleUnitPoint[ImpaleInstances] = (Position of ImpaleCaster[ImpaleInstances])
      • Set ImpaleAbilityCast = (Ability being cast)
      • Set ImpaleOffset[ImpaleInstances] = 0.00
      • Set ImpaleLevel[ImpaleInstances] = (Level of ImpaleAbilityCast for ImpaleCaster[ImpaleInstances])
      • Set ImpaleEffect = Abilities\Spells\Undead\Impale\ImpaleHitTarget.mdl
      • Set ImpaleTargetPoint[ImpaleInstances] = (Target point of ability being cast)
      • -------- This thing down here is for burrowstrike, because it's based on cast range --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ImpaleAbilityCast Equal to Burrowstrike
        • Then - Actions
          • Set BurrowInstances = (BurrowInstances + 1)
          • Set ImpaleDummySpell[ImpaleInstances] = Burrowstrike Stun
          • Set BurrowUnit[ImpaleInstances] = (Triggering unit)
          • Set BurrowPoint = (Position of BurrowUnit[ImpaleInstances])
          • Set BurrowPoint2[ImpaleInstances] = (Target point of ability being cast)
          • Set BurrowTarget[ImpaleInstances] = (Target unit of ability being cast)
          • Set BurrowTargetPosition[ImpaleInstances] = (Position of BurrowTarget[ImpaleInstances])
          • Countdown Timer - Start BurrowTimer as a One-shot timer that will expire in (((ImpaleRange / ImpaleSpace) / 10.00) / (750.00 / (Distance between BurrowPoint and BurrowPoint2[ImpaleInstances]))) seconds
          • Unit - Turn collision for BurrowUnit[ImpaleInstances] Off
          • Custom script: call RemoveLocation(udg_BurrowPoint)
          • Wait 0.17 seconds
          • Set BurrowInstances = (BurrowInstances - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BurrowTarget[(ImpaleInstances - BurrowInstances)] Equal to No unit
            • Then - Actions
              • Unit - Move BurrowUnit[(ImpaleInstances - BurrowInstances)] instantly to BurrowPoint2[(ImpaleInstances - BurrowInstances)]
            • Else - Actions
              • Unit - Move BurrowUnit[(ImpaleInstances - BurrowInstances)] instantly to BurrowTargetPosition[(ImpaleInstances - BurrowInstances)]
          • Animation - Play BurrowUnit[(ImpaleInstances - BurrowInstances)]'s morph alternate animation
          • Unit - Turn collision for BurrowUnit[(ImpaleInstances - BurrowInstances)] On
          • Custom script: call RemoveLocation(udg_BurrowPoint2[udg_ImpaleInstances - udg_BurrowInstances])
          • Custom script: call RemoveLocation(udg_BurrowTargetPosition[udg_ImpaleInstances - udg_BurrowInstances])
        • Else - Actions
          • Set ImpaleDummySpell[ImpaleInstances] = Impale Stun

Trigger:
  • Impale System Spikes
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer ImpaleLoop) from 1 to ImpaleInstances, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ImpaleOffset[ImpaleLoop] Less than ImpaleRange
            • Then - Actions
              • Set ImpaleOffset[ImpaleLoop] = (ImpaleOffset[ImpaleLoop] + ImpaleSpace)
              • Set ImpaleSpikesPoint = (ImpaleUnitPoint[ImpaleLoop] offset by ImpaleOffset[ImpaleLoop] towards (Angle from ImpaleUnitPoint[ImpaleLoop] to ImpaleTargetPoint[ImpaleLoop]) degrees)
              • Unit - Create 1 Impale Dummy for (Owner of ImpaleCaster[ImpaleLoop]) at ImpaleSpikesPoint facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Set ImpaleDummyPoint = (Position of (Last created unit))
              • Set ImpaleHitUnits = (Units within ImpaleAoE of ImpaleDummyPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to (Triggering unit)) and ((((Matching unit) is in ImpaleGroup[ImpaleLoop]) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of ImpaleCaster[ImpaleLoop])) Equal to True)
              • Custom script: call RemoveLocation(udg_ImpaleDummyPoint)
              • Custom script: call RemoveLocation(udg_ImpaleSpikesPoint)
              • Unit Group - Add all units of ImpaleHitUnits to ImpaleGroup[ImpaleLoop]
              • Unit Group - Pick every unit in ImpaleHitUnits and do (Actions)
                • Loop - Actions
                  • Set ImpalePickedUnitPoint = (Position of (Picked unit))
                  • Special Effect - Create a special effect at ImpalePickedUnitPoint using ImpaleEffect
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_ImpalePickedUnitPoint)
              • Custom script: call DestroyGroup(udg_ImpaleHitUnits)
              • Unit Group - Pick every unit in ImpaleGroup[ImpaleLoop] and do (Actions)
                • Loop - Actions
                  • Unit - Add Impale Stun to (Picked unit)
                  • Unit - Set level of Impale Stun for (Picked unit) to ImpaleLevel[ImpaleLoop]
                  • Unit - Add Storm Crow Form to (Picked unit)
                  • Unit - Remove Storm Crow Form from (Picked unit)
                  • Unit - Turn collision for (Picked unit) Off
                  • Unit - Pause (Picked unit)
            • Else - Actions
              • Custom script: call RemoveLocation(udg_ImpaleUnitPoint[udg_ImpaleLoop])
              • Custom script: call RemoveLocation(udg_ImpaleTargetPoint[udg_ImpaleLoop])

Trigger:
  • Impale System Flying
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer ImpaleLoop3) from 1 to ImpaleInstances, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in ImpaleGroup[ImpaleLoop3] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Less than 42
                • Then - Actions
                  • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 2)
                  • Animation - Change (Picked unit) flying height to ((Power(22.50, 2.00)) - ((22.50 - (Real((Custom value of (Picked unit))))) x (22.50 - (Real((Custom value of (Picked unit))))))) at 0.00
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Custom value of (Picked unit)) Equal to 42
                    • Then - Actions
                      • Set ImpalePickingUnits = (Units in (Playable map area) matching ((((Matching unit) is in ImpaleGroup[ImpaleLoop3]) Equal to True) and ((Custom value of (Matching unit)) Greater than or equal to 42)))
                      • Unit Group - Pick every unit in ImpalePickingUnits and do (Actions)
                        • Loop - Actions
                          • Animation - Change (Picked unit) flying height to 0.00 at 0.00
                          • Unit - Turn collision for (Picked unit) On
                          • Custom script: call RemoveLocation(udg_ImpalePickedUnitPosition)
                          • Unit - Unpause (Picked unit)
                          • Unit - Set the custom value of (Picked unit) to 0
                          • Custom script: call DestroyGroup(udg_ImpalePickingUnits)
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Equal to 0
                • Then - Actions
                  • Unit Group - Remove (Picked unit) from ImpaleGroup[ImpaleLoop3]
                  • Set ImpalePickedUnitPosition = (Position of (Picked unit))
                  • Unit - Create 1 Dummy for (Owner of ImpaleCaster[ImpaleLoop3]) at ImpalePickedUnitPosition facing Default building facing degrees
                  • Custom script: call RemoveLocation(udg_ImpalePickedUnitPosition)
                  • Unit - Add ImpaleDummySpell[ImpaleLoop3] to (Last created unit)
                  • Unit - Set level of ImpaleDummySpell[ImpaleLoop3] for (Last created unit) to (Level of Impale Stun for (Picked unit))
                  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                  • Unit - Remove Impale Stun from (Picked unit)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in ImpaleGroup[ImpaleLoop3]) Equal to 0
                • Then - Actions
                  • Custom script: call DestroyGroup(udg_ImpaleGroup[udg_ImpaleLoop3])
                • Else - Actions

Trigger:
  • Burrowstrike Stop
    • Events
      • Time - BurrowTimer expires
    • Conditions
    • Actions
      • Set ImpaleOffset[ImpaleInstances] = ImpaleRange
Screenshot:

It is like DotA's impale system. You can impale enemies again when they are stuned or in the air. I have included an impale and Burrowstrike that uses this system. Enjoy!

Changelog:
v1.0 - Initial release

v1.1 - Minor improvments to Burrowstrike and made the impale more smooth
 

Attachments

  • Impale System v1.1.w3x
    53.7 KB · Views: 460

Executor

I see you
Reaction score
57
- Units aren't "impaled" smoothly.
- When casting in the exact same moment burrowstrike won't port the caster.
- When burrowstrike ends creeps standing in front of the ported caster will also be impaled.
- When casting very often impale or burrowstrike on creeps, these won't stay in the air as different strikes WOULD do it in reality but they are bouncing rapidly up and down and up and down and up and down and up and down and up and down and up and down and up and down :)
 

Angel_Island

Much long, many time, wow
Reaction score
56
- Units aren't "impaled" smoothly.
- When casting in the exact same moment burrowstrike won't port the caster.
- When burrowstrike ends creeps standing in front of the ported caster will also be impaled.
- When casting very often impale or burrowstrike on creeps, these won't stay in the air as different strikes WOULD do it in reality but they are bouncing rapidly up and down and up and down and up and down and up and down and up and down and up and down and up and down :)

- I will try to make it smoother.
- I tested using 2 burrowstikes at the same moment and it ported both caster. Or are you referring to anything else?
- Doesn't that happen in dota too?
- Is that good or bad? And things that happen in a game is not reality.
 

Angel_Island

Much long, many time, wow
Reaction score
56
Perhaps they should only Impale units that are acutally within the spikes height?

Maybe it be more real then, but I wanted to be able to spam it on enemies like when playing nerubian assassin in wtf mode in DotA. You can spam his impale at an enemy unit and the unit will fly up and down even when they are above the spikes.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
I was actually planning to do the same based from the kunkka spellpack you made. But I am very glad that you have made the impale skill anyway. This is very useful and I had fun impaling units again and again :D Pretty useful and 10/10
 

Executor

I see you
Reaction score
57
Well I think such "spell systems" are hard to use in GUI.
In vJass you could provide a single line to call the spell with many settings.

JASS:

call Impale.cast(caster,GetUnitX(target),GetUnitY(target),800.,120.)


Imo you should try to make a vJass system..
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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

      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