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

AoE hit enemy only

Status
Not open for further replies.
Level 2
Joined
May 25, 2006
Messages
13
Iv tryed everyway i know how to pick units that are enemey only, and when i do the loop functions make the spell damage the units too much. please, i need a way to Pick enemy units in a regen and damage them one time

my latest attempt below


Unit Group - Pick every unit in (Units in (Region(hero_ghost_tri_temmpoint[0], hero_ghost_tri_temmpoint[2]))) and do (Actions)
Loop - Actions
Player Group - Pick every player in (All allies of (Owner of (Casting unit))) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Not equal to (Picked player)
Then - Actions
For each (Integer A) from 1 to 50, do (Actions)
Loop - Actions
Set hero_ghost_tri_target[(Integer A)] = (Picked unit)
Unit - Cause (Casting unit) to damage hero_ghost_tri_target[(Integer A)], dealing (300.00 + (Real((Level of (Ability being cast) for (Casting unit))))) damage of attack type Spells and damage type Normal
Else - Actions
Do nothing
 
Level 5
Joined
Aug 23, 2007
Messages
141
[Event]- Unit starts the effect of an ability
[Conditions]- ability being cast = xXTheYoshiXx's ability
[Actions]- Unit Group - pick every unit in units within (Area of effect number) matching condition (matching unit belongs to ally of owner of casting unit is equal to false) and do actions
Unit - make casting unit damage picked unit dealing xx damage of attack type spells and damage type normal.
Special Effect - create special effect at target point of ability being cast
set SpecialEffect = Last created special effect.
wait xx seconds
Special Effect - destroy SpecialEffect
 
Status
Not open for further replies.
Top