- Joined
- Nov 12, 2007
- Messages
- 2,339
I was trying to make this very simple MUI spell but it isn't working consistently (sometimes it does, sometimes it doesn't):
Is the problem some failure in my MUI logic? Thanks in advance!
-
SL Start
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Healing Liquor (test)
-
-

Actions
-


Set SL_MaxIndex = (SL_MaxIndex + 1)
-


Set SL_Caster[SL_MaxIndex] = (Triggering unit)
-


Set SL_TargetUnit[SL_MaxIndex] = (Target unit of ability being cast)
-


Set SL_TargetPosition[SL_MaxIndex] = (Position of SL_TargetUnit[SL_MaxIndex])
-


-------- -------------------------------------------- --------
-


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



If - Conditions
-




SL_MaxIndex Equal to 1
-
-



Then - Actions
-




Trigger - Turn on SL Loop <gen>
-
-



Else - Actions
-
-
-
-
SL Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer SL_CurrentIndex) from 1 to SL_MaxIndex, do (Actions)
-



Loop - Actions
-




-------- Healing --------
-




Unit - Create 1 Dummy for (Owner of SL_Caster[SL_CurrentIndex]) at SL_TargetPosition[SL_CurrentIndex] facing Default building facing degrees
-




Unit - Add Healing Liquor (DUMMY) to (Last created unit)
-




Unit - Order (Last created unit) to Human Priest - Inner Fire SL_TargetUnit[SL_CurrentIndex]
-




Unit - Remove (Last created unit) from the game
-




-------- Recycling --------
-




Custom script: call RemoveLocation(udg_SL_TargetPosition[udg_SL_CurrentIndex])
-




Set SL_Caster[SL_CurrentIndex] = SL_Caster[SL_MaxIndex]
-




Set SL_TargetPosition[SL_CurrentIndex] = SL_TargetPosition[SL_MaxIndex]
-




Set SL_TargetUnit[SL_CurrentIndex] = SL_TargetUnit[SL_MaxIndex]
-




Set SL_MaxIndex = (SL_MaxIndex - 1)
-




Set SL_CurrentIndex = (SL_CurrentIndex - 1)
-




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





If - Conditions
-






SL_MaxIndex Equal to 0
-
-





Then - Actions
-






Trigger - Turn off (This trigger)
-
-





Else - Actions
-
-
-
-
-
Is the problem some failure in my MUI logic? Thanks in advance!





