Trigger:
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Your Ability
- Actions
- Wait 0.55 game-time seconds
- Unit Group - Pick every unit in (Units within 325.00 of (Target point of ability being cast)) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
- ((Picked unit) is alive) Equal to True
- Then - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Normal and damage type Normal
- Else - Actions
- Do nothing
Of course adjust whats needed, you'll wanna also make it leak proof with unit group variables...
You can shorten the trigger by setting the unit group variable to a Units in Range Matching Condition... But either way will work...
Here's a leakless version:
Trigger:
- Bomb
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to <Your Ability>
- Actions
- Wait 0.55 game-time seconds
- Set tempPoint = Target point of ability being cast
- Set tempGroup = Units within 325.00 of tempPoint
- Unit Group - Pick every unit in tempGroup and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
- ((Picked unit) is alive) Equal to True
- Then - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Normal and damage type Normal
- Else - Actions
- Custom script: call DestroyGroup(udg_tempGroup)
- Custom script: call RemoveLocation(udg_tempPoint)
Fixed the event;
You should, almost, always use "Starts the effect of an ability" instead of "Begins casting an ability".
Also fixed the leaks.
And "Do nothing" is a useless action to call upon;
Don't do it.
You mean "Do nothing"?
All it does is call upon a function that does just that;
Nothing.
AFAIK, calling upon something that does nothing cannot cause problems .