- Joined
- Sep 13, 2013
- Messages
- 155
Why can't I make MUI 
This is not working correctly:

This is not working correctly:
-
Sunken Army
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Sunken Army
-
-

Actions
-


Set SunkenIndex = (SunkenIndex + 1)
-


Set SunkenTime[SunkenIndex] = 10.00
-


Set SunkenAllies[SunkenIndex] = (Units within 450.00 of (Target point of ability being cast) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True)))
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




SunkenIndex Equal to SunkenDiscount
-
-



Then - Actions
-




Custom script: call DestroyGroup(udg_SunkenAllies[udg_SunkenIndex])
-
-



Else - Actions
-
-


Unit Group - Pick every unit in SunkenAllies[SunkenIndex] and do (Actions)
-



Loop - Actions
-




Special Effect - Create a special effect at (Position of (Picked unit)) using WaterBlast.mdx
-




Special Effect - Destroy (Last created special effect)
-




Unit - Add Sunken to (Picked unit)
-
-
-
-
-
Sunken Army Loop
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer A) from 1 to SunkenIndex, do (Actions)
-



Loop - Actions
-




Set SunkenTime[(Integer A)] = (SunkenTime[(Integer A)] - 1.00)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Number of units in SunkenAllies[(Integer A)]) Greater than 0
-
-





Then - Actions
-






Unit Group - Pick every unit in SunkenAllies[(Integer A)] and do (Actions)
-







Loop - Actions
-








Unit - Add Sunken to (Picked unit)
-
-
-
-





Else - Actions
-






Set SunkenIndex = (SunkenIndex - 1)
-






Set SunkenDiscount = (Integer A)
-
-
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






SunkenTime[(Integer A)] Equal to 0.00
-
-





Then - Actions
-






Unit Group - Pick every unit in SunkenAllies[(Integer A)] and do (Actions)
-







Loop - Actions
-








Unit - Remove Sunken from (Picked unit)
-








Set SunkenIndex = (SunkenIndex - 1)
-








Custom script: call DestroyGroup(udg_SunkenAllies[udg_SunkenIndex])
-
-
-
-





Else - Actions
-
-
-
-
-










too simple but working !!!