• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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