• 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.

AoE Damage without damege allies?

Status
Not open for further replies.
Level 30
Joined
Feb 18, 2014
Messages
3,623
In the object editor ability stats you can specify which target will be affected by that spell, if you're using an AoE spell, you should make for e.g
" pick every units in a region (Owner of picked units is allied to "Your Player" equal to false...
 
Last edited:
Level 2
Joined
Jan 26, 2016
Messages
13
Pick all unit nearby your unit owned by ( owner of triggering unit equal to false ). Then deal x damage to picked unit.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Read GUI tutorials or review some basic triggering area of effect spells. Anyway UnitDamageGroup function is not recommended so its better to use UnitDamageTarget.

Starts the ability> ability is equal to aoe spell> caster, player, location/point variables declared> set bj_wantDestroyGroup = true ( custom script ) then Pick Every Units in an area> set picked unit variable > boolean check if it is not dead, it is enemy> UnitDamageTarget ( caster, picked unit )> remove leaks, null.
 
Level 2
Joined
May 24, 2015
Messages
12
I don't know, who can use a foto of triggers to help me :c



Sorry for bad inglish :v
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
A basic way to deal AOE damage to enemies;
  • Bomb Explosion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bomb Explosion
    • Actions
      • Set TempLoc = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 600.00 of TempLoc) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is Mechanical) Equal to False
              • ((Picked unit) is Magic Immune) Equal to False
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) belongs to an enemy of (Triggering player)) Equal to True
            • Then - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 250.00 damage of attack type Spells and damage type Normal
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempLoc)
This trigger will damage;
1. Non-structure units
2. Non-mechanical units
3. Non-magic immune units
4. The units are alive (useful when you want to do much more instead of just dealing damage to them)
5. The units are enemy of the caster
 
Status
Not open for further replies.
Top