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

[Trigger] Question about damage detection

Status
Not open for further replies.
Level 11
Joined
Jul 28, 2007
Messages
920
Detect Damage spell Copy
Events
Unit - A unit Begins casting an ability
Conditions
Actions
Countdown Timer - Start CombatTimer[(Player number of (Owner of (Target unit of ability being cast)))] as a One-shot timer that will expire in 10.00 seconds


How to detect unit targets of AOE spells(like Rain of Fire) ?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
First of all: Use the [ trigger ] tags to post a trigger that's decently readable for people.

As for your question: 'Pick units in x range of (Point of ability being cast)', where x is the range of the ability being cast. I don't think there's a way to automatically check the range of the ability, so you'll have to make If/Then/Else triggers, like this:
  • If (All Conditions are True) then do (Then Actions) else d (Else Actions)
    • If - Conditions
      • (Ability being cast) equal to Reign of Fire
    • Then - Actions
      • Set AbiRange = 1000.00
    • Else - Actions
      • If (All Condtions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) equal to Blizzard
        • Then - Actions
          • Set AbiRange = 1200
        • Else - Actions
  • Unit - Pick every unit in AbiRange of (Point of ability being cast)
 
Status
Not open for further replies.
Top