Making a Cone Damage spell that also slows.

lopp231

New Member
Reaction score
3
Hey i just had a question on making an ability like (Shockwave, Carrion Swarm, Breathe of Fire, or Crushing Wave, etc.) that also slows?
By slows i mean that if a unit is damage by this ability he the unit will have it's movement speed and attack speed reduced for a few seconds.
I'm pretty sure Dummy Casters are used for this but how?
Thanks!
 

lopp231

New Member
Reaction score
3
No. I thought it did too, but it's actually damage per second just like breathe of fire.
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
lopp231, if you don't mind, use a damage detection system.

Need two abilities, a main ability, based on Breath of Frost, make a new buff to it, another ability for slowing effect.
When a unit take damage, if it has the buff (new buff from your Breath of Frost), create dummy unit and cast the ability for slowing effect.

The trigger:
Trigger:
  • UnitTakeDamage Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set UnitsEnterMap = (Units in (Playable map area))
      • Unit Group - Pick every unit in UnitsEnterMap and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Trigger - Add to UnitTakeDamage <gen> the event (Unit - (Picked unit) Takes damage)

Trigger:
  • UnitTakeDamage EnterMap
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • ((Triggering unit) is in UnitsEnterMap) Equal to False
    • Actions
      • Set TempUnit = (Triggering unit)
      • Unit Group - Add TempUnit to UnitsEnterMap
      • Trigger - Add to UnitTakeDamage <gen> the event (Unit - TempUnit Takes damage)

Trigger:
  • UnitTakeDamage
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • -------- ---------------- --------
      • Set TempUnit = (Triggering unit)
      • Set TempUnit2 = (Damage source)
      • Set TempReal = (Damage taken)
      • -------- ---------------- Earth Shock --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit has buff Earth Shock ) Equal to True
          • (Damage taken) Greater than 0.00
        • Then - Actions
          • Unit - Remove Earth Shock buff from TempUnit
          • Set TempLoc = (Position of TempUnit)
          • Unit - Create 1 Dummy Unit for (Owner of TempUnit2) at TempLoc facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Earrth Shock Slow to (Last created unit)
          • Unit - Order (Last created unit) to Human Sorceress - Slow TempUnit
          • Custom script: call RemoveLocation( udg_TempLoc )
        • Else - Actions
      • -------- ---------------- Breath of Frost --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit has buff Breath of Frost (new)) Equal to True
          • (Damage taken) Greater than 0.00
        • Then - Actions
          • Unit - Remove Breath of Frost (new) buff from TempUnit
          • Set TempLoc = (Position of TempUnit)
          • Unit - Create 1 Dummy Unit for (Owner of TempUnit2) at TempLoc facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Breath of Frost Slow to (Last created unit)
          • Unit - Order (Last created unit) to Undead Lich - Frost Nova TempUnit
          • Custom script: call RemoveLocation( udg_TempLoc )
        • Else - Actions
      • -------- ---------------- --------
      • Trigger - Turn on (This trigger)


I made two abilities: Earth Shock and Breath of Frost,
Code:
    Earth Shock
Blasts a wave of force that damages and slows enemy units in a line.
use Slow for the slowing effect ability
Code:
    Breath of Frost
Blasts enemy units in a cone with cold magic, dealing damage and slowing them.
use Frost Nova for the slowing effect ability

Have a look at the demo map ! :thup:

If there is anything unclear to you , please just ask. :)
 

Attachments

  • [Demo] Custom Cone Spells.w3x
    15.8 KB · Views: 190

lopp231

New Member
Reaction score
3
Thanks a lot!
That's really good.
If anyone else has a way to do this please share, too!
 

D.V.D

Make a wish
Reaction score
73
You could just add slow from frost nova to breath of frost if you want it to slow.
 

FrozenShadow

I am a WolfieeifloW fan.
Reaction score
75
Are you certain that would work?

Though, the only way that I know, that would certainly work, is to manually cast slow on each affected unit with a dummy unit, though, I am not sure that it's possible to select every unit in a cone.
 

Curo

Why am I still playing this game...?
Reaction score
109
You could just add slow from frost nova to breath of frost if you want it to slow.

Adding the "slow" buff will NOT slow the units. The slow comes from the spell itself, and Breath of Frost etc have no slow.

Tom's damage detection system should work for you (assuming he wrote it correctly).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top