• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to filter a trigger order?

Level 8
Joined
Apr 16, 2025
Messages
160
I encountered a problem when creating a spell with a permanent mana shield. When the hero removes the mana shield, the order to remove and apply the mana shield is given. But this order starts the cycle again, and I need the trigger to work only when mana is removed manually. How to track the smart order to remove the mana shield? More precisely, how to ignore the trigger order without any crutches?
 
If the Mana Shield is permanent I dont see any reason to allow the player to turn it off at all. That can be achieved by hiding the Mana Shield ability outside the visible command card by setting button position X to 0 and Y to -11. In its place, show a dummy ability to the player that displays the usual tooltips.

If you still want to detect and cancel the order I prefer this approach:
  • Mana Shield Off Issued
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(manashieldoff))
      • ((Triggering unit) is in ManaShieldOffGroup.) Equal to False
    • Actions
      • Unit - For (Triggering unit), Ability Mana Shield, Disable ability: True, Hide UI: False
      • Unit Group - Add (Triggering unit) to ManaShieldOffGroup
      • Countdown Timer - Start ManaShieldOffTimer as a One-shot timer that will expire in 0.00 seconds
  • Mana Shield Off Timer Expires
    • Events
      • Time - ManaShieldOffTimer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ManaShieldOffGroup and do (Actions)
        • Loop - Actions
          • Unit - For (Picked unit), Ability Mana Shield, Disable ability: False, Hide UI: False
          • Unit Group - Remove (Picked unit) from ManaShieldOffGroup.
As an extra tidbit, if the Mana Shield ability is in the normal ability field it can be added as an default active ability and will be active when the hero is created.
default active.PNG
 
Last edited:
If the Mana Shield is permanent I dont see any reason to allow the player to turn it off at all. That can be achieved by hiding the Mana Shield ability outside the visible command card by setting button position X to 0 and Y to -11. In its place, show a dummy ability to the player that displays the usual tooltips.

If you still want to detect and cancel the order I prefer this approach:
  • Mana Shield Off Issued
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(manashieldoff))
      • ((Triggering unit) is in ManaShieldOffGroup.) Equal to False
    • Actions
      • Unit - For (Triggering unit), Ability Mana Shield, Disable ability: True, Hide UI: False
      • Unit Group - Add (Triggering unit) to ManaShieldOffGroup
      • Countdown Timer - Start ManaShieldOffTimer as a One-shot timer that will expire in 0.00 seconds
  • Mana Shield Off Timer Expires
    • Events
      • Time - ManaShieldOffTimer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ManaShieldOffGroup and do (Actions)
        • Loop - Actions
          • Unit - For (Picked unit), Ability Mana Shield, Disable ability: False, Hide UI: False
          • Unit Group - Remove (Picked unit) from ManaShieldOffGroup.
As an extra tidbit, if the Mana Shield ability is in the normal ability field it can be added as an default active ability and will be active when the hero is created.View attachment 544473
Thank you. I just thought that trigger orders are different from smart ones, but alas.
 
Back
Top