How do i get a triggered skill to damage only my enemy

Hell

New Member
Reaction score
0
Hello, I am a little confused with some triggers here and I can't seem to get my ability to function properly, my skill actually is a sacrifice ability, it turns ur current life to 20%, after 5 sec. it will deal damage to the area equal to the life lost.

I was able to do all of that but whenever it deals the damage, it affects all the units in the area including the caster and its allies and what I am trying to do is for the ability to damage only enemy units except structures.

please help!

If u don't understand what I mean just ask me again.
 

Kling[o]

New Member
Reaction score
7
you need to set a unit group that will take all enemies of owner of triggering unit then you pick them and you deal damage to picked unit
 

Mahrloc

New Member
Reaction score
5
i guess you are using the trigger "unit - damage area". if you do so, you should replace it with something like this:

Trigger:
  • Sacrifice
    • Event
      • Unit - A unit starts the effect of an ability
    • Condition
      • (Ability being cast) equal to Sacrifice
    • Actions
      • Set Sacrifice_Damage = ((Life of (Casting unit)) x 0.80)
      • Unit - Set life of (Casting unit) to ((Life of (Casting unit)) x 0.20)
      • Wait 5.00 seconds
      • Unit groop - Pick every unit in (Units within (your range) of (Position of (Casting unit)) matching ((((Matching unit) is a structure) equal to False) and ((Owner of (Matching unit)) equal to Player))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Casting unit) to damage (Picked unit), dealing (Sacrifice_Damage) damage of attack type Spells and damage type Magic


Sacrifice_Damage is a variable of type real
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top