AoE Damage without damege allies?

Status
Not open for further replies.
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:
Pick all unit nearby your unit owned by ( owner of triggering unit equal to false ). Then deal x damage to picked unit.
 
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.
 
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.
Back
Top