Poison w/ Triggers

Capndrs

New Member
Reaction score
3
So i have an ability that isnt based on a poisoning ability.
It is based off the crushing wave ability and it gives a buff called 'poisoned' to the hit units (i hope)

Anyways, I have played around a bit, but how would I make it so that when the unit has the buff it loses 20 health a second.

What would the trigger event be?
How would it detect all the units effected?
Trigger?
 

Shura

New Member
Reaction score
45
>>How would it detect all the units effected?
He might want a bit more information about this than check if X unit has buff.

Anyway, you would run a periodic trigger that picks every unit in the map with your buff. Something like this.
Trigger:
  • trigger
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching (((Matching unit) has buff Your Buff) Equal to True))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause (Picked unit) to damage (Picked unit), dealing 20.00 damage of attack type Normal and damage type Poison
      • Custom script: call RemoveGroup (udg_Temp_Group)

Note that if the unit dies from the poison, the unit won't get the kill.
 

jig7c

Stop reading me...-statement
Reaction score
123
>>How would it detect all the units effected?
He might want a bit more information about this than check if X unit has buff.

Anyway, you would run a periodic trigger that picks every unit in the map with your buff. Something like this.
Trigger:
  • trigger
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching (((Matching unit) has buff Your Buff) Equal to True))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause (Picked unit) to damage (Picked unit), dealing 20.00 damage of attack type Normal and damage type Poison
      • Custom script: call RemoveGroup (udg_Temp_Group)

Note that if the unit dies from the poison, the unit won't get the kill.

who gets the bounty when the unit dies?
who gets the credit when the hero dies?

no one!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top