help to make a trigger

Status
Not open for further replies.
Level 1
Joined
Nov 2, 2021
Messages
2
thanks to whoever responds, I am trying to make the following trigger:
when a group of units have a beneficial or malefic spell acquire an ability, when the beneficial or malefic spell is lost the ability is removed.
Thanks again
 
I'm not sure what you mean by "acquire an ability".

Do you mean acquire a Buff?

Here's an example that may help:
  • Add Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourAbility
    • Actions
      • Set VariableSet UnitGroup = (Units within 512.00 of (Target point of ability being cast).)
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Add Item Armor Bonus (+10) to (Picked unit)
  • Remove Ability
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Bloodlust) Equal to False
            • Then - Actions
              • Unit - Remove Item Armor Bonus (+10) from (Picked unit)
              • Unit Group - Remove (Picked unit) from UnitGroup.
            • Else - Actions
The idea here is that YourAbility applies the Bloodlust buff to the targets. You could do this using a Dummy unit in the first trigger.

Also, there's some other improvements that can be made to these triggers but I left them out for now.
 
Last edited:
Status
Not open for further replies.
Back
Top