so this trigger is supposed to create a dummy, and then cast the "break morale" spell as many times as it can before disappearing. it works right now but it'll on cast the spell on a single unit and i cant figure out how to get it to work correctly.
thanks in advance!
-
Break Morale
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Break Morale (Dummy)
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Player 1 (Red) Current lumber) Greater than or equal to 210
-
Then - Actions
- Player - Set Player 1 (Red) Current lumber to ((Player 1 (Red) Current lumber) - 210)
- Set BreakMoraleLocation = (Target point of ability being cast)
- Set BreakMoraleGroup = (Units within 512.00 of BreakMoraleLocation)
- Unit - Create 1 Magic Dummy for Player 1 (Red) at (BreakMoraleLocation offset by (0.00, 0.00)) facing Default building facing degrees
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Add Break Morale to (Last created unit)
- Unit - Order (Last created unit) to Undead Banshee - Activate Curse
-
Unit Group - Pick every unit in BreakMoraleGroup and do (Actions)
-
Loop - Actions
- Unit - Order (Last created unit) to Undead Banshee - Curse (Picked unit)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_BreakMoraleLocation)
- Custom script: call DestroyGroup (udg_BreakMoraleGroup)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
thanks in advance!