MUI Spell help!

MasterTrainer

New Member
Reaction score
0
Hello;

I'm just going to get straight to the point: I created an MUI spell, that slams the ground creating a circle of war stomps around the caster, then the caster omnislashes around the field, then stomps again, then summons a unit.

Here's the trigger:
Code:
ZS Loop
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        For each (Integer ZS_CurrentIndex) from 1 to ZS_MaxIndex, do (Actions)
            Loop - Actions
                Set ZS_Counter[ZS_CurrentIndex] = (ZS_Counter[ZS_CurrentIndex] + 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ZS_Counter[ZS_CurrentIndex] Equal to 30
                    Then - Actions
                        -------- [START] Circle War Stomp [START] --------
                        Set ZS_CasterLoc[ZS_CurrentIndex] = (Position of ZS_Caster[ZS_CurrentIndex])
                        For each (Integer ZS_CirclInt) from 1 to ZS_StartCircleNumber, do (Actions)
                            Loop - Actions
                                Set ZS_TempPoint[ZS_CurrentIndex] = (ZS_CasterLoc[ZS_CurrentIndex] offset by ZS_StartCircleOffset towards ((Real(ZS_CirclInt)) x (360.00 / (Real(ZS_StartCircleNumber)))) degrees)
                                Unit - Create 1 ZS_StartDummy for ZS_TempPlayer[ZS_CurrentIndex] at ZS_TempPoint[ZS_CurrentIndex] facing Default building facing degrees
                                Set ZS_Dummy[ZS_CirclInt] = (Last created unit)
                                Unit - Add a 0.30 second Generic expiration timer to ZS_Dummy[ZS_CirclInt]
                        Set ZS_TempGroup1[ZS_CurrentIndex] = (Units within 300.00 of ZS_CasterLoc[ZS_CurrentIndex] matching (((Matching unit) belongs to an enemy of ZS_TempPlayer[ZS_CurrentIndex]) Equal to True))
                        Unit Group - Pick every unit in ZS_TempGroup1[ZS_CurrentIndex] and do (Actions)
                            Loop - Actions
                                Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage (Picked unit), dealing ZS_StartCircleDamage damage of attack type Chaos and damage type Divine
                        Custom script:  call DestroyGroup(udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
                        Custom script:  call RemoveLocation(udg_ZS_TempPoint[udg_ZS_CurrentIndex])
                        -------- [END] Circle War Stomp [END] --------
                        -------- [START] Omnislash[START] --------
                        For each (Integer ZS_LoopInt) from 1 to ZS_Omnislash_Loop, do (Actions)
                            Loop - Actions
                                Set ZS_TempGroup1[ZS_CurrentIndex] = (Units within ZS_Omnislash_Range of ZS_CasterLoc[ZS_CurrentIndex] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of ZS_TempPlayer[ZS_CurrentIndex]) Equal t
                                Set ZS_TempGroup2[ZS_CurrentIndex] = (Random 1 units from ZS_TempGroup1[ZS_CurrentIndex])
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Number of units in ZS_TempGroup1[ZS_CurrentIndex]) Greater than 0
                                    Then - Actions
                                        Unit Group - Pick every unit in ZS_TempGroup2[ZS_CurrentIndex] and do (Actions)
                                            Loop - Actions
                                                Set ZS_PickedUnit[ZS_CurrentIndex] = (Picked unit)
                                                Set ZS_PickedUnitLoc[ZS_CurrentIndex] = (Position of ZS_PickedUnit[ZS_CurrentIndex])
                                                Custom script:  call SetUnitPositionLoc( udg_ZS_Caster[udg_ZS_CurrentIndex], udg_ZS_PickedUnitLoc[udg_ZS_CurrentIndex])
                                                Special Effect - Create a special effect at ZS_PickedUnitLoc[ZS_CurrentIndex] using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
                                                Special Effect - Destroy (Last created special effect)
                                                Custom script:  call RemoveLocation( udg_ZS_PickedUnitLoc[udg_ZS_CurrentIndex])
                                                Custom script:  set udg_ZS_PickedUnitLoc[udg_ZS_CurrentIndex] = null
                                                Animation - Play ZS_Caster[ZS_CurrentIndex]'s ZS_Omnislash_AttackAnim animation
                                                Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage ZS_PickedUnit[ZS_CurrentIndex], dealing ZS_Omnislash_Damage damage of attack type ZS_Omnislash_AttackType and damage type ZS_Omnislash_DamageType
                                                Special Effect - Create a special effect attached to the ZS_Omnislash_AttachPoint of ZS_Caster[ZS_CurrentIndex] using ZS_Omnislash_Sfx
                                                Special Effect - Destroy (Last created special effect)
                                        Custom script:  call DestroyGroup( udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
                                        Custom script:  call DestroyGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
                                        Set ZS_Omniboolean[ZS_CurrentIndex] = True
                                    Else - Actions
                                        Custom script:  call DestroyGroup( udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
                                        Custom script:  call DestroyGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
                                        Set ZS_Omniboolean[ZS_CurrentIndex] = False
                        -------- [END] Omnislash[END] --------
                        -------- [START] Final Circle War Stomp [START] --------
                        Set ZS_CasterLoc[ZS_CurrentIndex] = (Position of ZS_Caster[ZS_CurrentIndex])
                        For each (Integer ZS_CirclInt) from 1 to ZS_FinalCircleNumber, do (Actions)
                            Loop - Actions
                                Set ZS_TempPoint[ZS_CurrentIndex] = (ZS_CasterLoc[ZS_CurrentIndex] offset by ZS_FinalCircleOffset towards ((Real(ZS_CirclInt)) x (360.00 / (Real(ZS_FinalCircleNumber)))) degrees)
                                Unit - Create 1 ZS_FinalDummy for ZS_TempPlayer[ZS_CurrentIndex] at ZS_TempPoint[ZS_CurrentIndex] facing Default building facing degrees
                                Set ZS_Dummy[ZS_CirclInt] = (Last created unit)
                                Unit - Add a 0.30 second Generic expiration timer to ZS_Dummy[ZS_CirclInt]
                        Unit Group - Pick every unit in ZS_TempGroup1[ZS_CurrentIndex] and do (Actions)
                            Loop - Actions
                                Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage (Picked unit), dealing ZS_FinalCircleDamage damage of attack type Chaos and damage type Divine
                        -------- [END] Final Circle War Stomp [END] --------
                        -------- [START] Summon Phase [START] --------
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ZS_Omniboolean[ZS_CurrentIndex] Equal to True
                            Then - Actions
                                For each (Integer ZS_LoopInt) from 1 to ZS_SummonedCount, do (Actions)
                                    Loop - Actions
                                        Unit - Create 1 ZS_SummonedUnit for ZS_TempPlayer[ZS_CurrentIndex] at ZS_CasterLoc[ZS_CurrentIndex] facing (Facing of ZS_Caster[ZS_CurrentIndex]) degrees
                                        Unit - Add a ZS_SummonedUnitDuration second Generic expiration timer to (Last created unit)
                                        Set ZS_TempPoint[ZS_LoopInt] = (Position of (Last created unit))
                                        Special Effect - Create a special effect at ZS_TempPoint[ZS_LoopInt] using ZS_SummonedUnitSfx
                                        Special Effect - Destroy (Last created special effect)
                            Else - Actions
                        Custom script:  call DestroyGroup(udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
                        Custom script:  call RemoveLocation(udg_ZS_TempPoint[udg_ZS_CurrentIndex])
                        Custom script:  call RemoveLocation(udg_ZS_CasterLoc[udg_ZS_CurrentIndex])
                        Custom script:  set udg_ZS_TempPoint[udg_ZS_CurrentIndex] = null
                        -------- Recycling --------
                        Set ZS_Caster[ZS_CurrentIndex] = ZS_Caster[ZS_MaxIndex]
                        Set ZS_CasterLoc[ZS_CurrentIndex] = ZS_CasterLoc[ZS_MaxIndex]
                        Set ZS_Counter[ZS_CurrentIndex] = ZS_Counter[ZS_MaxIndex]
                        Set ZS_TempPlayer[ZS_CurrentIndex] = ZS_TempPlayer[ZS_MaxIndex]
                        Set ZS_Omniboolean[ZS_CurrentIndex] = ZS_Omniboolean[ZS_MaxIndex]
                        Set ZS_MaxIndex = (ZS_MaxIndex - 1)
                        Set ZS_CurrentIndex = (ZS_CurrentIndex - 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ZS_MaxIndex Equal to 0
                            Then - Actions
                                Trigger - Turn off (This trigger)
                            Else - Actions
                        -------- Instance Recycled --------
                        -------- End Loop --------
                        -------- End Cast --------
                    Else - Actions
Now pay attention to the actions between [START]Omnislash[START] and [END]Omnislash[END]. Those are the actions that make up the Omnislash phase. Now, at this point the caster just really, really, moves quickly around the battlefield, and ergo just makes it looks like he hit one unit because of the continuous loop with no waits.
What I can't figure out is, how to make the caster wait temporarily from one loc to another before slashing another unit again without ruining the Multi-Unit Instanceability.
Help?
 

Solu9

You can change this now in User CP.
Reaction score
216
Could you start two array timers for the amount of players in the game, which both gets set in the omnislash phase?

-One repeating that expires every 0.2 second.
-One that expires after the omnislash phase ends.
 

Solu9

You can change this now in User CP.
Reaction score
216
Because you want the timers to be player specific so they don't interfere if more than one unit uses the ability. Of course if there can never be more then one unit in the map who can use the ability there is no need to make the timers arrays.
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top