• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] MUI Spell, Wait, Possible?

Status
Not open for further replies.
The condition "equal to no Unit" will never be true unless ZS_Omnislash_Loop is reached or all units in range are removed/killed. Is that really the behaviour you want?

Also, EVERY unit in range will be damaged with every loop iteration. I don't think this is what you want! You only want tempPickedUnit to be damaged, don't you? Remove the "Pick every unit in tempGroup1" thing.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
The condition "equal to no Unit" will never be true unless ZS_Omnislash_Loop is reached or all units in range are removed/killed. Is that really the behaviour you want?

Also, EVERY unit in range will be damaged with every loop iteration. I don't think this is what you want! You only want tempPickedUnit to be damaged, don't you? Remove the "Pick every unit in tempGroup1" thing.

But the Omnislashing should stop when TempUnit returns null right or when there are no more units to be omnislashed right? So after that the next and final phase takes place, then finally the de-indexing.

And if I remove the Pick every unit in tempgroup1, how will the war stomp phases deal damage?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
That's no what I meant. When your unit is omnislashing, you only want the currently slashed unit to take damage, not all units in range, don't you?

Oh yes, but the Pick Every Unit in tempgroup 1 refers to the units in range from the caster when the final phase happens, not while omnislashing.

Anyways, I have updated the trigger:

  • 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
              • Set ZS_Counter[ZS_CurrentIndex] = 0
              • -------- [START] Circle War Stomp [START] --------
              • Set ZS_CasterLoc[ZS_CurrentIndex] = (Position of ZS_Caster[ZS_CurrentIndex])
              • Unit - Create 1 ZS_StartDummy for ZS_TempPlayer[ZS_CurrentIndex] at ZS_CasterLoc[ZS_CurrentIndex] facing Default building facing degrees
              • Set ZS_Dummy = (Last created unit)
              • For each (Integer ZS_CirclInt) from 1 to ZS_StartCircleNumber, do (Actions)
                • Loop - Actions
                  • Set ZS_TempPoint = (ZS_CasterLoc[ZS_CurrentIndex] offset by ZS_StartCircleOffset towards ((Real(ZS_CirclInt)) x (360.00 / (Real(ZS_StartCircleNumber)))) degrees)
                  • Custom script: call SetUnitPostionLoc(udg_ZS_Dummy, udg_ZS_TempPoint)
                  • Animation - Add the birth animation tag to ZS_Dummy
                  • Animation - Play ZS_Dummy's birth animation
              • Unit - Remove ZS_Dummy from the game
              • Set ZS_TempGroup1 = (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 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)
              • Custom script: call RemoveLocation(udg_ZS_TempPoint)
              • -------- [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 = (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 = (Random 1 units from ZS_TempGroup1)
                  • Custom script: set udg_ZS_PickedUnit[udg_ZS_CurrentIndex] = FirstOfGroup( udg_ZS_TempGroup2)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ZS_PickedUnit[ZS_CurrentIndex] Equal to No unit
                    • Then - Actions
                      • -------- Fnial Phase and De-indexing --------
                      • -------- [START] Final Circle War Stomp [START] --------
                      • Set ZS_CasterLoc[ZS_CurrentIndex] = (Position of ZS_Caster[ZS_CurrentIndex])
                      • Unit - Create 1 ZS_FinalDummy for ZS_TempPlayer[ZS_CurrentIndex] at ZS_CasterLoc[ZS_CurrentIndex] facing Default building facing degrees
                      • Set ZS_Dummy = (Last created unit)
                      • For each (Integer ZS_CirclInt) from 1 to ZS_FinalCircleNumber, do (Actions)
                        • Loop - Actions
                          • Set ZS_TempPoint = (ZS_CasterLoc[ZS_CurrentIndex] offset by ZS_FinalCircleOffset towards ((Real(ZS_CirclInt)) x (360.00 / (Real(ZS_FinalCircleNumber)))) degrees)
                          • Custom script: call SetUnitPostionLoc(udg_ZS_Dummy, udg_ZS_TempPoint)
                          • Animation - Add the birth animation tag to ZS_Dummy
                          • Animation - Play ZS_Dummy's birth animation
                      • Unit - Remove ZS_Dummy from the game
                      • Unit Group - Pick every unit in ZS_TempGroup1 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] --------
                      • Custom script: call DestroyGroup(udg_ZS_TempGroup1)
                      • Custom script: call RemoveLocation(udg_ZS_TempPoint)
                      • Custom script: call RemoveLocation(udg_ZS_CasterLoc[udg_ZS_CurrentIndex])
                      • Custom script: set udg_ZS_TempPoint = 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
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Number of units in ZS_TempGroup2) Greater than 0
                        • Then - Actions
                          • Animation - Change ZS_Caster[ZS_CurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
                          • Animation - Change ZS_Caster[ZS_CurrentIndex]'s animation speed to 50.00% of its original speed
                          • Unit Group - Pick every unit in ZS_TempGroup2 and do (Actions)
                            • Loop - Actions
                              • 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])
                              • 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
                              • Unit Group - Remove ZS_PickedUnit[ZS_CurrentIndex] from ZS_TempGroup2
                              • 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)
                          • Custom script: call DestroyGroup( udg_ZS_TempGroup2)
                          • Animation - Change ZS_Caster[ZS_CurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                          • Animation - Change ZS_Caster[ZS_CurrentIndex]'s animation speed to 100.00% of its original speed
                          • Set ZS_Omniboolean[ZS_CurrentIndex] = True
                        • Else - Actions
                          • Custom script: call DestroyGroup( udg_ZS_TempGroup1)
                          • Custom script: call DestroyGroup( udg_ZS_TempGroup2)
                          • Set ZS_Omniboolean[ZS_CurrentIndex] = False
              • -------- [END] Omnislash[END] --------
            • Else - Actions
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Okay I decided to put the Omnislash phase in another trigger, and I set it up with a different integer variable for MaxIndex and CurrentIndex and the counter.

But the Omnislash doesn't work. Help.



  • ZS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Zephyr Strike
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ZS_MaxIndex Equal to 0
        • Then - Actions
          • -------- If no instance is running, we turn on the loop --------
          • Trigger - Turn on ZS Loop <gen>
        • Else - Actions
      • Set ZS_MaxIndex = (ZS_MaxIndex + 1)
      • Set ZS_OmniMaxIndex = (ZS_OmniMaxIndex + 1)
      • Set ZS_OmniCounter[ZS_OmniMaxIndex] = 0
      • Set ZS_Caster[ZS_MaxIndex] = (Triggering unit)
      • Set ZS_CasterLoc[ZS_MaxIndex] = (Position of ZS_Caster[ZS_MaxIndex])
      • Set ZS_TempPlayer[ZS_MaxIndex] = (Owner of ZS_Caster[ZS_MaxIndex])
      • Set ZS_Counter[ZS_MaxIndex] = 0
      • Set ZS_Omniboolean[ZS_MaxIndex] = False



  • 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] --------
              • Trigger - Turn on ZS Omnislash Loop <gen>
              • -------- [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] --------
              • 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



  • ZS Omnislash Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer ZS_OmniCurrentIndex) from 1 to ZS_OmniMaxIndex, do (Actions)
        • Loop - Actions
          • Set ZS_OmniCounter[ZS_OmniCurrentIndex] = (ZS_OmniCounter[ZS_OmniCurrentIndex] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ZS_OmniCurrentIndex Equal to 1
            • Then - Actions
              • For each (Integer ZS_LoopInt) from 1 to ZS_Omnislash_Loop, do (Actions)
                • Loop - Actions
                  • Set ZS_TempGroup1[ZS_OmniCurrentIndex] = (Units within ZS_Omnislash_Range of ZS_CasterLoc[ZS_OmniCurrentIndex] 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_OmniCurrentIndex])
                  • Set ZS_TempGroup2[ZS_OmniCurrentIndex] = (Random 1 units from ZS_TempGroup1[ZS_OmniCurrentIndex])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in ZS_TempGroup1[ZS_OmniCurrentIndex]) Greater than 0
                    • Then - Actions
                      • Animation - Change ZS_Caster[ZS_OmniCurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
                      • Animation - Change ZS_Caster[ZS_OmniCurrentIndex]'s animation speed to 50.00% of its original speed
                      • Unit Group - Pick every unit in ZS_TempGroup2[ZS_CurrentIndex] and do (Actions)
                        • Loop - Actions
                          • Set ZS_OmniCounter[ZS_OmniCurrentIndex] = 0
                          • Set ZS_PickedUnit[ZS_OmniCurrentIndex] = (Picked unit)
                          • Set ZS_PickedUnitLoc[ZS_OmniCurrentIndex] = (Position of ZS_PickedUnit[ZS_CurrentIndex])
                          • Custom script: call SetUnitPositionLoc( udg_ZS_Caster[udg_ZS_OmniCurrentIndex], udg_ZS_PickedUnitLoc[udg_ZS_OmniCurrentIndex])
                          • Special Effect - Create a special effect at ZS_PickedUnitLoc[ZS_OmniCurrentIndex] using war3mapImported\blazingwind.MDX
                          • Special Effect - Destroy (Last created special effect)
                          • Custom script: call RemoveLocation( udg_ZS_PickedUnitLoc[udg_ZS_OmniCurrentIndex])
                          • Custom script: set udg_ZS_PickedUnitLoc[udg_ZS_OmniCurrentIndex] = null
                          • Animation - Play ZS_Caster[ZS_OmniCurrentIndex]'s ZS_Omnislash_AttackAnim animation
                          • Unit - Cause ZS_Caster[ZS_OmniCurrentIndex] to damage ZS_PickedUnit[ZS_OmniCurrentIndex], dealing ZS_Omnislash_Damage damage of attack type ZS_Omnislash_AttackType and damage type ZS_Omnislash_DamageType
                          • Unit Group - Remove ZS_PickedUnit[ZS_OmniCurrentIndex] from ZS_TempGroup2[ZS_OmniCurrentIndex]
                          • Special Effect - Create a special effect attached to the ZS_Omnislash_AttachPoint of ZS_Caster[ZS_OmniCurrentIndex] using ZS_Omnislash_Sfx
                          • Special Effect - Destroy (Last created special effect)
                      • Custom script: call DestroyGroup( udg_ZS_TempGroup1[udg_ZS_OmniCurrentIndex])
                      • Custom script: call DestroyGroup( udg_ZS_TempGroup2[udg_ZS_OmniCurrentIndex])
                      • Animation - Change ZS_Caster[ZS_OmniCurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                      • Animation - Change ZS_Caster[ZS_OmniCurrentIndex]'s animation speed to 100.00% of its original speed
                      • Set ZS_Omniboolean[ZS_OmniCurrentIndex] = True
                    • Else - Actions
                      • Custom script: call DestroyGroup( udg_ZS_TempGroup1[udg_ZS_OmniCurrentIndex])
                      • Custom script: call DestroyGroup( udg_ZS_TempGroup2[udg_ZS_OmniCurrentIndex])
                      • Set ZS_Omniboolean[ZS_CurrentIndex] = False
              • Set ZS_OmniCounter[ZS_OmniCurrentIndex] = ZS_OmniCounter[ZS_OmniMaxIndex]
              • Set ZS_OmniMaxIndex = (ZS_OmniMaxIndex - 1)
              • Set ZS_OmniCurrentIndex = (ZS_OmniCurrentIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ZS_MaxIndex Equal to 0
                • Then - Actions
                  • Set ZS_OmniCounter[ZS_OmniCurrentIndex] = 0
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions

 
Level 29
Joined
Oct 24, 2012
Messages
6,543
the lower the time the more inaccurate. it will never be exactly .03 for both triggers. The time ranges but when using .03 if the one keeps going at .031 and the other keeps going at .030. It will be quiet a bit off. Enough to notice in a long spell. It may also be frowned upon to add an extra trigger. Also it can cause ur trigger to bug up if a unit is moved in both of these.

Either way u should switch it back to one trigger it would be easier to manage and control
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Okay I tried using the counter, but no matter how high I go, it just won't wait. Help?

  • 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_TempCounter[ZS_CurrentIndex] = 0
                  • For each (Integer ZS_TempInt) from 1 to 50, do (Actions)
                    • Loop - Actions
                      • Set ZS_TempCounter[ZS_CurrentIndex] = (ZS_TempCounter[ZS_CurrentIndex] + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ZS_TempCounter[ZS_CurrentIndex] Equal to 50
                        • Then - 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
                              • Animation - Change ZS_Caster[ZS_CurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
                              • Animation - Change ZS_Caster[ZS_CurrentIndex]'s animation speed to 50.00% of its original speed
                              • 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 war3mapImported\blazingwind.MDX
                                  • 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
                                  • Unit Group - Remove ZS_PickedUnit[ZS_CurrentIndex] from ZS_TempGroup2[ZS_CurrentIndex]
                                  • 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])
                              • Animation - Change ZS_Caster[ZS_CurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                              • Animation - Change ZS_Caster[ZS_CurrentIndex]'s animation speed to 100.00% of its original speed
                              • 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
                        • Else - Actions
              • -------- [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] --------
              • 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
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
this is ur problem right here.....
  • For each (Integer ZS_LoopInt) from 1 to ZS_Omnislash_Loop, do (Actions)
  • Loop - Actions
    • Set ZS_TempCounter[ZS_CurrentIndex] = 0
    • For each (Integer ZS_TempInt) from 1 to 50, do (Actions)
      • Loop - Actions
      • Set ZS_TempCounter[ZS_CurrentIndex] = (ZS_TempCounter[ZS_CurrentIndex] + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ZS_TempCounter[ZS_CurrentIndex] Equal to 50
every .03 seconds u increase this integer by 50. so it runs every .03 seconds. You need to get rid of all of these integer loops
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
this is ur problem right here.....
  • For each (Integer ZS_LoopInt) from 1 to ZS_Omnislash_Loop, do (Actions)
  • Loop - Actions
    • Set ZS_TempCounter[ZS_CurrentIndex] = 0
    • For each (Integer ZS_TempInt) from 1 to 50, do (Actions)
      • Loop - Actions
      • Set ZS_TempCounter[ZS_CurrentIndex] = (ZS_TempCounter[ZS_CurrentIndex] + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ZS_TempCounter[ZS_CurrentIndex] Equal to 50
every .03 seconds u increase this integer by 50. so it runs every .03 seconds. You need to get rid of all of these integer loops

If I get rid of all of those integer loops the Omnislash will literally hit only one enemy... what do you mean?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Okay I'm starting to see your point, but if I remove the loop, the caster will hit every enemy unit in range, and will only stop when there are no more enemy units in range. It's supposed to only hit units as many times as ZS_OmnislashLoop can, in this case, 8 times, means the caster will only slash 8 times, not as long as there are units in range.

EDIT: I tried it, here's the trigger:

  • 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] --------
              • 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
                  • Animation - Change ZS_Caster[ZS_CurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
                  • Animation - Change ZS_Caster[ZS_CurrentIndex]'s animation speed to 50.00% of its original speed
                  • 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])
                      • Set ZS_Counter[ZS_CurrentIndex] = 0
                      • Special Effect - Create a special effect at ZS_PickedUnitLoc[ZS_CurrentIndex] using war3mapImported\blazingwind.MDX
                      • 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
                      • Unit Group - Remove ZS_PickedUnit[ZS_CurrentIndex] from ZS_TempGroup2[ZS_CurrentIndex]
                      • 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])
                  • Animation - Change ZS_Caster[ZS_CurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                  • Animation - Change ZS_Caster[ZS_CurrentIndex]'s animation speed to 100.00% of its original speed
                  • 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] --------
              • 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


But still there are no delays.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
No I mean 8 units are hit, anyways 8 is not constant because 8 is a configurable integer.
Let's say there are 8 units around the caster, that means 8 units are hit once.
Let's say there are only 7 units are around the caster, that means 6 units are hit once and 1 unit is hit twice.
Let's say there are only 6 units are around the caster, that means 5 units are hit once, and two units are hit thrice.

The algorithm is like that.
 
Status
Not open for further replies.
Top