• 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.

[Trigger] Damage over time trigger

Status
Not open for further replies.
Level 3
Joined
Jan 5, 2008
Messages
26
I'm trying to make the spell "aerial shackles" use triggered damage per second (like damage = intelligence x 2) instead of the damage from the object editor. Since it's a channeling spell, I want the damage only to be done every second and only if the caster is still channeling. Here's my trigger:

  • Shackles DOT
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shackles
    • Actions
      • Set ShacklesTimer = 0
      • Set ShacklesUnit[1] = (Triggering unit)
      • Set ShacklesUnit[2] = (Target unit of ability being cast)
      • Trigger - Turn on Shackles Timer <gen>
  • Shackles Timer
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set ShacklesTimer = (ShacklesTimer + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ShacklesUnit[2] has buff Shackles ) Equal to True
        • Then - Actions
          • Unit - Cause ShacklesUnit[1] to damage ShacklesUnit[2], dealing (1.20 x (Real((Intelligence of (Target unit of ability being cast) (Include bonuses))))) damage of attack type Spells and damage type Normal
        • Else - Actions
          • Trigger - Turn off (This trigger)
When I cast shackles, there is no damage being dealt. Can someone help me find out what's wrong with this trigger? :(
 
Last edited:
  • 1.20 x (Real((Intelligence of (Target unit of ability being cast) (Include bonuses))))
Should be

  • 1.20 x (Real((Intelligence of (ShacklesUnit[1]) (Include bonuses))))
Cause I guess you want the caster's intelligence, not the target's, right? If not, then change it to ShacklesUnit[2]. The reason why it didn't work is because you didn't refer to the stored unit, but some random Target unit of ability being cast, that doesn't even respond to the Time - Every 1.00 seconds event.
 
Level 3
Joined
Jan 5, 2008
Messages
26
  • 1.20 x (Real((Intelligence of (Target unit of ability being cast) (Include bonuses))))
Should be

  • 1.20 x (Real((Intelligence of (ShacklesUnit[1]) (Include bonuses))))
Cause I guess you want the caster's intelligence, not the target's, right? If not, then change it to ShacklesUnit[2]. The reason why it didn't work is because you didn't refer to the stored unit, but some random Target unit of ability being cast, that doesn't even respond to the Time - Every 1.00 seconds event.

omg I can't believe I missed that!!! Thanks a lot :grin::grin::grin:
 
Level 3
Joined
Jan 5, 2008
Messages
26
Just a question, why do even need this ?
  • Set ShacklesTimer = (ShacklesTimer + 1)
When you have this, to check on
  • (ShacklesUnit[2] has buff Shackles ) Equal to True

I wanted the damage over time to be done for 4 seconds at the MAX. And also there's the buff check in case the caster stops channeling shackles for whatever reason.

But you just pointed out another error in my trigger :xxd:

I should have this in the conditions:

  • (ShacklesTimer) Not equal to 4
So here's the new working trigger :grin:
  • Shackles Timer
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set ShacklesTimer = (ShacklesTimer + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ShacklesUnit[2] has buff Shackles ) Equal to True
          • ShacklesTimer Not equal to 4
        • Then - Actions
          • Unit - Cause ShacklesUnit[1] to damage ShacklesUnit[2], dealing (1.20 x (Real((Intelligence of ShacklesUnit[1] (Include bonuses))))) damage of attack type Spells and damage type Normal
        • Else - Actions
          • Trigger - Turn off (This trigger)
 
Status
Not open for further replies.
Top