• 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] Area of effect damage help

Status
Not open for further replies.
Level 5
Joined
Jun 13, 2012
Messages
113
  • Unit - Cause Caster to damage circular area after 0.10 seconds of radius 400.00 at (Position of Target), dealing 500.00 damage of attack type Spells and damage type Normal
it deals 500 damage to all units i just want it to damage the enemy unit how can i do that?
 
Level 10
Joined
Jan 20, 2011
Messages
492
You would have to create a loop using Pick Every Unit within your region, then put an if statement within it, and have a condition stating if picked unit is an enemy, then deal the damage, to the picked unit.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Actions
    • Set TempLoc = (Position of (Triggering unit))
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units within 600.00 of TempLoc matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
      • Loop - Actions
        • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
    • Custom script: call RemoveLocation(udg_TempLoc)
The custom script action is to clean the Unit Group leak.
For 'TempLoc', it is to clean the Point leak.
And use Damage Target instead of Damage Area

That trigger above will damage any enemy unit within 600 AOE around the Caster for 500 damage.
 
Status
Not open for further replies.
Top