• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Help creating an "Ability is active" Condition.

Status
Not open for further replies.
Level 2
Joined
Feb 17, 2020
Messages
7
Hey folks, I'm trying hard to make a condition/trigger for detecting if ability defense (same as human footman) is active.
I just cant make it work, my goal is to give a building the ability "defense" and if "defense" is active then do (loop of event), when is desactivated then (stop loop).

any hints for this?





:goblin_cry:thanks!
 
Level 39
Joined
Feb 27, 2007
Messages
5,031
You can’t really check if it’s active on command. Instead you have to catch when it’s ordered to defend and undefend each time.

A roundabout way to query its defense state is to remove the ability from the unit. Doing so will order it to undefend if the ability was active when you removed it, then you have to re-Add the ability and order it to defend if it was active when removed.
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Not sure if defend has a buff or not, but, why not give your units a statless immolation/manashield, it should provide a buff enough to "denote" whether it's active or not.
When checking for "Active" units find the corresponding buff and do your actions.
 
Status
Not open for further replies.
Top