• 🏆 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!

Detect when casting frost, flamme or dark arrow

Status
Not open for further replies.
Level 28
Joined
Feb 18, 2014
Messages
3,579
Auto-cast spells like searing arrows, frost arrows or black arrows don't count as normal spells but rather as an issued order/damage event. You will need two triggers to detect them, one that detects when a unit is issued to cast the spell and the other that detects when the target is attacked.
Here's an example on how to detect searing arrows/black arrows :
  • Searing Arrows Initial
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(flamingarrows))
        • Then - Actions
          • Trigger - Turn on Searing Arrows Detection <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(unflamingarrows))
        • Then - Actions
          • Trigger - Turn off Searing Arrows Detection <gen>
        • Else - Actions
  • Searing Arrows Detection
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Searing Arrow Detected !
Frost arrows is tricky because it doesn't have an order ID which means you cannot detect it using the method above. However, you can use the event A unit is attacked and check if this latter has a buff caused by Frost arrows using the boolean condition : (Triggering unit) has buff X )

Edit : I just made some testing and I found out that Frost arrows does actually has an order ID :p

Frost Arrows On : coldarrows
Frost Arrows Off : uncoldarrows
 
Last edited:
Status
Not open for further replies.
Top