• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Autocast Events?

Status
Not open for further replies.
Go to your ability and scroll to Text - Order String - Activate/Deactivate. These are the order id's you need to memorize.
  • Trigger
  • Events
    • Unit - A unit is issued an order with no target
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Issued order) Equal to (order(flamingarrows))
      • Then - Actions
        • Unit Group - Add (Triggering unit) to AutocastGroup
      • Else - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Issued order) Equal to (order(unflamingarrows))
          • Then - Actions
            • Unit Group - Remove (Triggering unit) from AutocastGroup
          • Else - Actions
Now, everytime you want to check if your unit has autocast make the Boolean comparison (Unit - Unit is in Unit group)
  • ((Triggering unit) is in AutocastGroup) Equal to True
 
Level 7
Joined
Jun 14, 2009
Messages
235
Go to your ability and scroll to Text - Order String - Activate/Deactivate. These are the order id's you need to memorize.
  • Trigger
  • Events
    • Unit - A unit is issued an order with no target
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Issued order) Equal to (order(flamingarrows))
      • Then - Actions
        • Unit Group - Add (Triggering unit) to AutocastGroup
      • Else - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Issued order) Equal to (order(unflamingarrows))
          • Then - Actions
            • Unit Group - Remove (Triggering unit) from AutocastGroup
          • Else - Actions
Now, everytime you want to check if your unit has autocast make the Boolean comparison (Unit - Unit is in Unit group)
  • ((Triggering unit) is in AutocastGroup) Equal to True

Is that also how you would make defend work?
 
Status
Not open for further replies.
Top