This is my first attempt to create a MUI Spell alone (no help, only me and my little and fucked knowleged). I was intended to create an ability that damages over time enemies in the Area by their Max HP and this is what I made. (I am not a expert GUI, nor nothing, just the basic one.)
I want you, Pros, if you want and if I am not asking too much from you, to analyse this and tell me what's wrong, how can I fix, if I did it well or not, what I did wrong, etc. But remember, this is my first attempt ALONE, meaning, all my other MUI Triggers I got your help (thx you all alot), except this.
-
Ability Start
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Ability Actions
-


Set Ability_MaxIndex = (Ability_MaxIndex + 1)
-


Set Ability_caster[Ability_MaxIndex] = (Triggering unit)
-


Set Ability_AoE[Abilty_MaxIndex] = (Target point of ability being cast)
-


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



If - Conditions
-




Abilty_MaxIndex Equal to 1
-
-



Then - Actions
-




Trigger - Turn on Ability Periodic <gen>
-
-



Else - Actions
-
-
-
-
Ability Periodic
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer Ability_CurrentIndex) from 1 to Abilty_MaxIndex, do (Actions)
-



Loop - Actions
-




Set Ability_Period[Ability_CurrentIndex] = (Ability_Period[Ability_CurrentIndex] + 0.03)
-




Set Ability_UnitGroup = (Units within 500.00 of Ability_AoE[Ability_CurrentIndex] matching (((Matching unit) belongs to an enemy of (Owner of Ability_caster[Ability_CurrentIndex])) Equal to True))
-




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





If - Conditions
-






Ability_Period[Ability_CurrentIndex] Less than 5.00
-
-





Then - Actions
-






Unit Group - Pick every unit in Ability_UnitGroup and do (Actions)
-







Loop - Actions
-








Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - ((10.00 + (0.02 x (Real((Intelligence of Ability_caster[Ability_CurrentIndex] (Include bonuses)))))) x 0.03))%
-
-
-
-





Else - Actions
-






Set Ability_AoE[Ability_CurrentIndex] = Ability_AoE[Ability_MaxIndex]
-






Set Ability_caster[Ability_CurrentIndex] = Ability_caster[Ability_MaxIndex]
-






Set Ability_CurrentIndex = Ability_MaxIndex
-






Set Ability_CurrentIndex = (Ability_CurrentIndex - 1)
-






Set Ability_MaxIndex = (Ability_MaxIndex - 1)
-






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







If - Conditions
-








Ability_MaxIndex Equal to 0
-
-







Then - Actions
-








Trigger - Turn off (This trigger)
-
-







Else - Actions
-
-
-
-
-
-


Custom script: call RemoveLocation(udg_Ability_AoE[udg_Ability_CurrentIndex])
-


Custom script: call DestroyGroup(udg_Ability_UnitGroup)
-
-







