[Spell] Item Ability to Work On Unit

Status
Not open for further replies.
Level 9
Joined
Nov 27, 2014
Messages
1,966
I am currently doing an ability where the effect is an increase in attackspeed(already done with custom base ability) but also reduce the targeted unit's armor.
I do not want another buff to clutter the buff/debuff bar so I have been trying to use the Item Damage Increase ability with a negative value added to that unit.
However, it does not seem to either be adding the ability or either the ability's "effect" is not triggering.
I have tried to change it back to positive value but it has no difference(no effect on the unit's attack)
1659143237837.png
  • WENDIGO Enrage Start
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Wendigo_EnrageGroup = (Units in (Playable map area) matching (((Picked unit) has buff Enrage ) Equal to True))
      • Trigger - Turn on WENDIGO Enrage Loop <gen>
  • WENDIGO Enrage Cast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Enrage
    • Actions
      • Unit - Add Wendigo Armor Decrease to (Target unit of ability being cast)
      • Unit Group - Add (Target unit of ability being cast) to Wendigo_EnrageGroup
  • WENDIGO Enrage Loop
    • Events
      • Time - Every 0.40 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Wendigo_EnrageGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enrage ) Equal to True
            • Then - Actions
              • Do nothing
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enrage ) Equal to False
            • Then - Actions
              • Unit - Remove Wendigo Armor Decrease from (Picked unit)
              • Unit Group - Remove (Picked unit) from Wendigo_EnrageGroup
            • Else - Actions
Is there a way to simulate the decrease in armor without another buff? I require this more than making the item ability work fyi.
 

Uncle

Warcraft Moderator
Level 71
Joined
Aug 10, 2018
Messages
7,615
So you're making some mistakes in your triggers.

WENDIGO Enrage Start doesn't make any sense, you can delete that trigger entirely.
Unit Groups are initialized by default so you don't need to Set the variable. Also, Units are manually added to the Unit Group inside of the Cast trigger.

WENDIGO Enrage Cast should use the Event "A unit Starts the effect of an ability".
That's the go to Event for spell casting. If you're using Finishes casting anywhere else you should change it to Starts. The same is true for Begins casting. HOWEVER, there are some cases where you may want to use Begins/Finishes but that's usually for something special like interrupting an ability.

Then in the Cast trigger you should be turning WENDIGO Enrage Loop on. The Loop trigger only needs to be on while a unit has the buff.

Then you can delete the first If Then Else in WENDIGO Enrage Loop, there's absolutely no reason to check if the unit has the buff.
Also, the Action "Do nothing" does literally nothing, it's no different from a comment.

Then add in an If Then Else to the very end of the Loop trigger:
If (Number of units in Wendigo_EnrageGroup Equal to 0) then Turn off (this trigger)
 
Last edited:
Level 9
Joined
Nov 27, 2014
Messages
1,966
So you're making some mistakes in your triggers.

WENDIGO Enrage Start doesn't make any sense, you can delete that trigger entirely.
Unit Groups are initialized by default so you don't need to Set the variable. Also, Units are manually added to the Unit Group inside of the Cast trigger.
Good to know, Thanks.

WENDIGO Enrage Cast should use the Event "A unit Starts the effect of an ability".

That's the go to Event for spell casting. If you're using Finishes casting anywhere else you should change it to Starts. The same is true for Begins casting. HOWEVER, there are some cases where you may want to use Begins/Finishes but that's usually for something special like interrupting an ability.

Then in the Cast trigger you should be turning WENDIGO Enrage Loop on. The Loop trigger only needs to be on while a unit has the buff.
Aight, done.
Then you can delete the first If Then Else in WENDIGO Enrage Loop, there's absolutely no reason to check if the unit has the buff.
Also, the Action "Do nothing" does literally nothing, it's no different from a comment.
Done.
Then add in an If Then Else to the very end of the Loop trigger:
If (Number of units in Wendigo_EnrageGroup Equal to 0) then Turn off (this trigger)
Done.
Final Triggers
  • WENDIGO Enrage Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Enrage
    • Actions
      • Unit - Add Wendigo Armor Decrease to (Target unit of ability being cast)
      • Unit Group - Add (Target unit of ability being cast) to Wendigo_EnrageGroup
      • Trigger - Turn on WENDIGO Enrage Cast <gen>
  • WENDIGO Enrage Loop
    • Events
      • Time - Every 0.40 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Wendigo_EnrageGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enraged ) Equal to False
            • Then - Actions
              • Unit - Remove Wendigo Armor Decrease from (Picked unit)
              • Unit Group - Remove (Picked unit) from Wendigo_EnrageGroup
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Wendigo_EnrageGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions

And it works now! Thank you.
 
Status
Not open for further replies.
Top