• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to make a damage over time trigger?

Status
Not open for further replies.
Level 1
Joined
Jul 9, 2011
Messages
2
Im trying to create a trigger enhanced spell of something like envenomed weapons and every 3 seconds the buff deals damage = 3x agility.
 
Level 7
Joined
Dec 29, 2008
Messages
252
First, create 3 variables: CastUnit (unit variable), EffectedUnits (unit group variable), and AgilityVar (integer variable). Then just follow the triggers

  • Trigger
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to EnvenomedWeapons
    • Actions
      • Set CastUnit = (Triggering unit)
      • Unit Group - Add (Target unit of ability being cast) to EffectedUnits
      • Set AgilityVar = ((Agility of CastUnit (Include bonuses)) x 3)
  • Damage
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EffectedUnits and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff EnvenomedWeaponsBuff) Equal to True
            • Then - Actions
              • Unit - Cause CastUnit to damage (Picked unit), dealing (Real(AgilityVar)) damage of attack type Spells and damage type Normal
            • Else - Actions
              • Unit Group - Remove (Picked unit) from EffectedUnits
I dont know if this is completely leakless, so if you have a problem with it, just tell me.
 
Status
Not open for further replies.
Top