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

[Solved] For Each unit in range (do actions)

Status
Not open for further replies.
Level 2
Joined
Jun 2, 2013
Messages
12
I want a system when i use thunder clap,pick every unit in 250AOE and for each unit cause +10 damage,Exemple: I use thunder clap,and affect 3 units,the damage caused is 30.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
  • t
  • Events
    • A unit starts the effect of an ability
  • Conditions
    • Ability being cast is equal to YourAbility
  • Actions
    • Set YourUnitVariable = (Triggering Unit)
    • Set YourPointVariable = Position of YourUnitVariable
    • Set YourGroupVariable = Units in 250 AoE from YourPointVariable
    • Set YourIntegerVariable = Number of units in YourGroupVariable
    • Unit Group - Pick Every Unit in YourGroupVariable and do (actions)
      • Loop - Actions
        • Unit - Make YourUnitVariable damage (Picked Unit) by 10*YourIntegerVariable
    • Custom script: call RemoveLocation(udg_YourPointVariable)
    • Custom script: call DestroyGroup(udg_YourGroupVariable)
 
Status
Not open for further replies.
Top