Using Disple on group which has at least 1 unit that have certain buff

Exoudar

New Member
Reaction score
2
Hey there,

I tried to make a trigger that will make my tower cast disple on units that has certain buff (bloodlust for example), it worked but not flawlessly.

The problem I am having is when 1 unit doesn't have bloodlust and the whole group around it have the buff, it wouldn't cast disple.

here is my trigger:


Obstacle Tower Magic Disple
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacking unit)) Equal to Obstacle Tower (Level 2)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Attacked unit) is in (Units within 300.00 of (Position of (Attacked unit)) matching (((Matching unit) has buff Bloodlust) Equal to True))) Equal to True
Then - Actions
Unit - Order (Attacking unit) to Human Priest - Dispel (Attacked unit)
Else - Actions




What I want is that my tower will cast disple even if only 1 units within range has the bloodlust.


thanks in advance
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Trigger:
  • Dispel
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Obstacle Tower (Level 2)
    • Actions
      • Set TempPoint = (Position of (Attacked unit))
      • Set TempUnitGroup = (Units within 300.00 of TempPoint matching ((((Matching unit) has buff Bloodlust) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempUnitGroup) Greater than or equal to 1
        • Then - Actions
          • Unit - Order (Attacking unit) to Human Priest - Dispel (Attacked unit)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)


Something like that would better suit your purposes.
 

Exoudar

New Member
Reaction score
2
^ wow that actually worked perfectly, had to change "triggering unit" to" attacking unit" though, other than that , thanks alot.
 
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