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

Detect when casting frost, flamme or dark arrow

Status
Not open for further replies.
Level 29
Joined
Feb 18, 2014
Messages
3,584
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