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.

      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