So, according to all the MUI tutorials online, you're supposed to do something like this for MUI (GUI spell example incoming):
Wouldn't the following happen?
Thanks.
-
Flower Power
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Mass Hook
-
-
Actions
-
-------- The amount of Projectiles rotating around the hero :D --------
-
Set VariableSet XF_Amount_of_Hooks = ((Level of Mass Hook for (Triggering unit)) x 3)
-
For each (Integer XF_Start) from 1 to XF_Amount_of_Hooks, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
XF_Skip Equal to 0
-
-
Then - Actions
-
-------- Determins the String model name ... .. so it gives the model of the projectile rotating around the hero .. and the hook --------
-
Set VariableSet XF_Model_Rotators[0] = Abilities\Weapons\SentinelMissile\SentinelMissile.mdl
-
Set VariableSet XF_Model_Rotators[1] = Abilities\Weapons\DruidoftheTalonMissile\DruidoftheTalonMissile.mdl
-
Trigger - Turn on Flower Power Loop <gen>
-
-
Else - Actions
-
-
Set VariableSet XF_Times = (XF_Times + 1)
-
Set VariableSet XF_Skip = (XF_Skip + 1)
-
Set VariableSet XF_Off[XF_Times] = True
-
Set VariableSet XF_Hero[XF_Times] = (Casting unit)
-
Set VariableSet XF_Point[8] = (Position of XF_Hero[XF_Times])
-
-------- ------------------------------------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------------------------------------- --------
-
-------- The SETTINGS below this line --------
-
Set VariableSet XF_Hooks[XF_Times] = 5
-
Set VariableSet XF_Max_Dist_Decoy[XF_Times] = 550.00
-
Set VariableSet XF_Speed[XF_Times] = 12.00
-
-------- Do not touch anything below this line --------
-
-------- ------------------------------------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------------------------------------- --------
-
Set VariableSet XF_Ticks[XF_Times] = (Random real number between 50.00 and 250.00)
-
Set VariableSet XF_Part[XF_Times] = 0
-
Set VariableSet XF_MaxDistance[XF_Times] = 71.00
-
Set VariableSet XF_Angle[XF_Times] = (Random angle)
-
Set VariableSet XF_Point[0] = (XF_Point[8] offset by 50.00 towards XF_Angle[XF_Times] degrees.)
-
Unit - Create 1 Dummy_For_Map for (Owner of XF_Hero[XF_Times]) at XF_Point[8] facing Default building facing degrees
-
Set VariableSet XF_Dummy_Rotator[XF_Times] = (Last created unit)
-
Special Effect - Create a special effect attached to the chest of (Last created unit) using XF_Model_Rotators[0]
-
Set VariableSet XF_Special_ROtator[XF_Times] = (Last created special effect)
-
Custom script: call RemoveLocation(udg_XF_Point[0])
-
Custom script: call RemoveLocation(udg_XF_Point[8])
-
-
-
-
Wouldn't the following happen?
- Unit1 casts spell, trigger starts, index is set to index+1 i.e. 1
- Unit2 casts spell just shortly after Unit1 but the trigger for Unit1 is still running, index is set to index+1 again i.e. 2 now
- Unit1 trigger now indexes all array variables by index which is now 2 not 1, thus casting incorrectly
Thanks.