• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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