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

Owner of debuff.

Status
Not open for further replies.
Level 14
Joined
Aug 23, 2013
Messages
285
How can i get owner of debuff ( the caster of debuff spell ) to deal damage overtime on unit ( being debuff unit ).
Ex:
Unit A cast curse on unit B.
Trigger :
for every 0.05s. Unit A deal damage to unit B. (Problem here)

I don't know how to get Unit A ownership of debuff from unit B.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
So you want a Caster to cast a debuff on a Target, and let the Caster deal damage per interval/second to the Target ?

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set MaxIndex = (MaxIndex + 1)
      • Set Caster[MaxIndex] = (Triggering unit)
      • Set Target[MaxIndex] = (Target unit of ability being cast)
      • Set Duration[MaxIndex] = 5.00
      • Trigger - Turn on Loop <gen>
  • Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MaxIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • For each (Integer CurrentIndex) from 1 to MaxIndex, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Duration[CurrentIndex] Greater than 0.00
                  • (Target[CurrentIndex] has buff Buff) Equal to True
                  • (Target[CurrentIndex] is alive) Equal to True
                • Then - Actions
                  • Set Duration[CurrentIndex] = (Duration[CurrentIndex] - 0.03)
                  • Unit - Cause Caster[CurrentIndex] to damage Target[CurrentIndex], dealing 10.00 damage of attack type Spells and damage type Normal
                • Else - Actions
                  • Set Caster[CurrentIndex] = Caster[MaxIndex]
                  • Set Duration[CurrentIndex] = Duration[MaxIndex]
                  • Set Target[CurrentIndex] = Target[MaxIndex]
                  • Set MaxIndex = (MaxIndex - 1)
This trigger will deal 10 damage per 0.03 second (10*33) 330 damage per second to the Target as long as the target has:
1. Is alive
2. Duration > 0
3. Has the debuff
 
Level 14
Joined
Aug 23, 2013
Messages
285
So you want a Caster to cast a debuff on a Target, and let the Caster deal damage per interval/second to the Target ?

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set MaxIndex = (MaxIndex + 1)
      • Set Caster[MaxIndex] = (Triggering unit)
      • Set Target[MaxIndex] = (Target unit of ability being cast)
      • Set Duration[MaxIndex] = 5.00
      • Trigger - Turn on Loop <gen>
  • Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MaxIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • For each (Integer CurrentIndex) from 1 to MaxIndex, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Duration[CurrentIndex] Greater than 0.00
                  • (Target[CurrentIndex] has buff Buff) Equal to True
                  • (Target[CurrentIndex] is alive) Equal to True
                • Then - Actions
                  • Set Duration[CurrentIndex] = (Duration[CurrentIndex] - 0.03)
                  • Unit - Cause Caster[CurrentIndex] to damage Target[CurrentIndex], dealing 10.00 damage of attack type Spells and damage type Normal
                • Else - Actions
                  • Set Caster[CurrentIndex] = Caster[MaxIndex]
                  • Set Duration[CurrentIndex] = Duration[MaxIndex]
                  • Set Target[CurrentIndex] = Target[MaxIndex]
                  • Set MaxIndex = (MaxIndex - 1)
This trigger will deal 10 damage per 0.03 second (10*33) 330 damage per second to the Target as long as the target has:
1. Is alive
2. Duration > 0
3. Has the debuff

Also. I need a custom critical system but i can't figure it out.

My custom critical system is like this.

Unit Critical Chance = Unit Basic Critical Chance[x]+ Item Critical Chance[x]+ Abilities[x].
Unit Critical Damage = Unit Basic Critical Chance[x]+ Item Critical Damage[x]+ Abilities[x]

The problem is he. how can trigger recognition which x of unit is?

Secondary System.
Every unit have a spellbook that contain 2 ability.
Ability Critical Chance and Ability Critical Damage.
A trigger that increase or reduce chance/damage of critical when acquire or drop a item.
A trigger that increase or reduce chance/damage of critical when add,remove,level up/down a ability change level of those two spell.
A trigger that increase or reduce chance/damage of critical when unit having debuff. (base on your trigger).

it's seem secondary system is too annoy and long. can you help me ( not trigger it all but give a hint about it ).
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Defskull, dead units can not have buffs ;)

Duration > 0
To cater duration of the spell

UnitHasBuff
To cater if the unit's debuff is dispelled

IsDead
To cater if the unit is dead

All of these condition is to cater exit criteria for units to be removed from the index.

I know, dead unit can't have buff, but that condition is to cater the debuffing action, that's it.
 
Status
Not open for further replies.
Top