• 🏆 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.
Level 20
Joined
Apr 14, 2012
Messages
2,901
Hello;

I created a spell the other day that creates a circle of war-stomps, then makes the caster omnislash around the battlefield. My problem is, when the caster omnislashes, instead of showing that the caster stops at one location to play the attack anim and damage the Picked Unit before going on to the next, the spell shows that the caster kills multiple units in one, big hit.

Understandable because there are no forms of waits that would make the slasher wait temporarily from loc to loc. That's why I came here, because I don't know how to make the caster wait temporarily from the Picked Unit's location before SetUnitPositionLoc takes place and moves the caster to the next Picked Unit's location.

Here are the triggers:

I might have cut off the trigger but to tell you the truth the rest of the trigger is just for recycling the instance, not much to see.

  • 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
                      • 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 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])
                      • 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] --------
            • Else - Actions


Could you help me?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
I can't exactly test if it works, because when I press test map on JNGP it doesn't load the map, it only opens TFT. Even if I do play it from TFT it doesn't load the map.

But if I remove the Custom Script and the Unit Group - Remove Unit actions and let the spell stay as it was, JNGP and TFT loads the map.

Is that normal? (I'm sure it's not but I'm looking for some clarity regarding the new problem)

Here's the new trigger anyways:

  • 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
                      • 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: set (udg_ZS_PickedUnit[udg_ZS_CurrentIndex]) = FirstOfGroup( udg_ZS_TempGroup2[udg_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
                          • 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] --------
            • Else - Actions
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Best way to do this I believe would be to use the firstofgroup and just attack one unit at a time. Then when the group is empty that's when u de-index everything.

Also change this ZS_CurrentIndex to a tempInt. The reason for this is all u need is a temp integer. So there is no point to have Un-needed variables.

What do u mean TFT ?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Best way to do this I believe would be to use the firstofgroup and just attack one unit at a time. Then when the group is empty that's when u de-index everything.

Also change this ZS_CurrentIndex to a tempInt. The reason for this is all u need is a temp integer. So there is no point to have Un-needed variables.

What do u mean TFT ?

How do I attack one unit at a time? I already used FirstOfGroup (look at my previous post) and also I de-index everything after the Omnislash phase, but I cut it out those triggers to make it a short post.

I don't think there would be much change if I made CurrentIndex to TempInt because all that changed is the name.

TFT = The Frozen Throne.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You can then use
  • Custom script: set udg_TempUnit = FirstOfGroup(udg_Group)
to get the first unit in a group. You can then remove this unit from the group after the animation played.
This way you can iterate through them one by one with a delay inbetween.

I know you can use this function to 'ease' your mind and let the trigger do all the works but trust me, this function is buggy in a sense of, this function is not truly random.

Here's the test map to prove it to you.

Instructions:
1. Press ESC key to kill so-called random units in the test map.
2. You will notice the "order" is to start from the middle of the map and towards the right of the map (the killing order).
3. Next, exit the test map and look in the Trigger Editor, disable Kill Unit FirstOfGroup Trigger and enable the Kill Unit Randomly Trigger.
4. As usual, test the map and when the map starts, press ESC key until all unit dies.
5. After all unit dies, record the pattern, after you have recorded the pattern, press F10 -> E -> R (this would restart the map).
6. Repeat the ESC key until all unit dies.
7. Record the death pattern.
8. Compare the death pattern in first test and second test.
9. You will notice it's not the same (this is what we meant by 'random').
10. You can do the same repetitive tests with the FirstOfGroup but I'll tell you, the result (pattern) would be same all the time (like some sort of hidden algorithm that Blizzard doesn't show)

Conclusion: Use the second trigger for 'truly random'.
 

Attachments

  • FirstOfGroup Is Not Truly Random.w3x
    12.7 KB · Views: 34
Level 29
Joined
Oct 24, 2012
Messages
6,543
Changing them to tempInt makes it so every spell has tempInt instead of having useless variables.

Also just use random unit from group. dont use a group loop instead u should add a counter in ur group loop. dont forget that ur trigger is running at .03 seconds. this means that if u want a 1 second wait use 33.3333 as ur counter max then order the unit to attack and do the special effect. then u set the counter back to 0 and do the same thing again.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
@defskull:
well, he never asked for randomness, so FirstOfGroup is the most simple way to do it.

@MasterTrainer:
The problem is that you've used it wrong. You don't use FirstOfGroup inside the "Pick every unit in" block. FirstOfGroup is meant to be used standalone.

Basicly, what you do is this (written in pseudo-code):

- Enum a group
- on each time iteration of your trigger, you get the FirstOfGroup and perform your slash on this unit
- If FirstOfGroup returns a null unit, all units have been damaged and you can stop the time iteration and recycle everything
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
yes that works. the difference is that if u have 50 spells then u have 50 variables when all u need is one.

What if I use just one integer variable called CurrentIndex for those 50 spells? Then all I used is one, which I plan to.

Also, when I set TempUnit to FirstOfGroup, I don't need to set it again as Picked Unit right?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
that works to but u alread have tempInt for temp integers in ur other triggers thats y i suggest that one lol.

and no get rid of the group loop completely. dont set it to picked unit

Sure... but I was told that for different loops I should use different integers.

I'm sorry I'm still trying to process this could you show what you mean by get rid of the group loop completely?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
use the custom script to set the unit = FirstOfGroup( udg_group)
then use an ITE
if unit = null
then
de-index here
else
do the stuff u have in the group here. not the set unit = picked unit tho

also if u have a loop inside a loop or u use a wait inside the loop then u need to use seperate integers. if u have loop1 then loop2 u can use the same integer
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
use the custom script to set the unit = FirstOfGroup( udg_group)
then use an ITE
if unit = null
then
de-index here
else
do the stuff u have in the group here. not the set unit = picked unit tho

also if u have a loop inside a loop or u use a wait inside the loop then u need to use seperate integers. if u have loop1 then loop2 u can use the same integer

I can't test for myself if it works because the map won't play. Even if I Test Map from JNGP the map does not load. Even if I play directly in TFT the map doesn't load.

Any fix for this first?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
I'm going to post this in the Zephyr anyways, so wth:
Here's the whole thing:


  • ZS Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- CONFIGURE --------
      • -------- Circle Start to Final Configurables --------
      • -------- ///////////////////////////////////// --------
      • -------- Determines the number of War Stomps created at Cast --------
      • Set ZS_StartCircleNumber = 12
      • -------- Determines the number of Thunder Claps created at the latter --------
      • Set ZS_FinalCircleNumber = 8
      • -------- Determines how far the effects are created from the caster --------
      • Set ZS_StartCircleOffset = 400.00
      • Set ZS_FinalCircleOffset = 300.00
      • -------- Determines how much damage are createdby the circles --------
      • Set ZS_StartCircleDamage = 250.00
      • Set ZS_FinalCircleDamage = 250.00
      • -------- Determines the SFX units created for the circles: --------
      • Set ZS_StartDummy = ZS_Dummy
      • Set ZS_FinalDummy = ZS_FinalDummy
      • -------- ///////////////////////////////////// --------
      • -------- End Circle Config --------
      • -------- Omnislash Configurables --------
      • -------- ///////////////////////////////////// --------
      • -------- Determined How many times the caster moves around the battlefield slashing: --------
      • Set ZS_Omnislash_Loop = 8
      • -------- Determines the Range the caster omnislashes from his original position: --------
      • Set ZS_Omnislash_Range = 600.00
      • -------- Determines the damage the caster inflicts whilst omnislashing --------
      • Set ZS_Omnislash_Damage = 110.00
      • -------- The Attack Type for the damage inflicted whilst omnislashing: --------
      • Set ZS_Omnislash_AttackType = Chaos
      • -------- The Damage Type for the attack inflicted whilst omnislashing --------
      • Set ZS_Omnislash_DamageType = Divine
      • -------- Determines the sfx attached to the caster --------
      • Set ZS_Omnislash_Sfx = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
      • -------- Determines where on the caster the sfx is attached to while omnislashing --------
      • Set ZS_Omnislash_AttachPoint = weapon
      • -------- Determines what animation is played when the caster slashes the enemy --------
      • Set ZS_Omnislash_AttackAnim = attack
      • -------- ///////////////////////////////////// --------
      • -------- End Omnislash Config --------
      • -------- END CONFIG --------



  • 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_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] --------
              • 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])
                  • Custom script: set udg_ZS_PickedUnit[udg_ZS_CurrentIndex] = FirstOfGroup( udg_ZS_TempGroup2[udg_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_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
                          • 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
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
u never changed the group loop to what we suggested...

Oh sorry that was the old trigger before I added your suggestion; because I thought it would never work out so I reverted back to the original.

Just give me some time and I'll change it back again. Though I'm not sure if I followed your suggestion right, especially to the last one you suggested, but I'll post what I did so far.

EDIT: Okay so I updated the Loop trigger, and now the map is playable too. Though the delay is not created, I vaguely know why, so you may want to shed some light there.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
its still not right. do it like this.

  • 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 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])
        • 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
to this
  • 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])
    • Custom script: set udg_tempUnit = FirstOfGroup( udg_ZS_TempGroup2[ZS_CurrentIndex]
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • udg_tempUnit equal no unit
      • Then - Actions
        • de-index here
      • Else - 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
        • Set tempPoint = (Position of tempUnit)
        • Custom script: call SetUnitPositionLoc( udg_ZS_Caster[udg_ZS_CurrentIndex], udg_tempPoint)
        • 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_tempPoint)
        • Custom script: set udg_tempPoint = null
        • Animation - Play ZS_Caster[ZS_CurrentIndex]'s ZS_Omnislash_AttackAnim animation
        • Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage tempUnit, 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])
    • 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
to make a delay with a .03 second timer u need to use a counter and count up with an integer to the delay u want. so u do omniInt + omniInt + 1. then when it hits says 34 ( slightly over 1 second) u do the actions then set it to 0 again. u will have to rework a lot of ur trigger to do it this way.

u already need to change the de-indexing so it wont be that much work. u will have to change the top section of ur trigger.
Aslo watch out for spells that create 30 dummies every .03 seconds. The reason for this is that units always leak. if this is cast enough times it will eventually crash wc3.
Also since u give them a .3 second timer to expire, that means that u create 300 b4 the first one gets removed. That will cause a ton of lag.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
its still not right. do it like this.

  • 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 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])
        • 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
to this
  • 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])
    • Custom script: set udg_tempUnit = FirstOfGroup( udg_ZS_TempGroup2[ZS_CurrentIndex]
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • udg_tempUnit equal no unit
      • Then - Actions
        • de-index here
      • Else - 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
        • Set tempPoint = (Position of tempUnit)
        • Custom script: call SetUnitPositionLoc( udg_ZS_Caster[udg_ZS_CurrentIndex], udg_tempPoint)
        • 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_tempPoint)
        • Custom script: set udg_tempPoint = null
        • Animation - Play ZS_Caster[ZS_CurrentIndex]'s ZS_Omnislash_AttackAnim animation
        • Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage tempUnit, 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])
    • 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
to make a delay with a .03 second timer u need to use a counter and count up with an integer to the delay u want. so u do omniInt + omniInt + 1. then when it hits says 34 ( slightly over 1 second) u do the actions then set it to 0 again. u will have to rework a lot of ur trigger to do it this way.

u already need to change the de-indexing so it wont be that much work. u will have to change the top section of ur trigger.
Aslo watch out for spells that create 30 dummies every .03 seconds. The reason for this is that units always leak. if this is cast enough times it will eventually crash wc3.
Also since u give them a .3 second timer to expire, that means that u create 300 b4 the first one gets removed. That will cause a ton of lag.

I haven't read the whole post yet but I will do tomorrow.

Thanks for the help.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543

  • -------- [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 20
Joined
Apr 14, 2012
Messages
2,901

  • -------- [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] --------
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
if that just runs when the spell starts put it in the registration trigger. ur cast trigger

Actually that runs after the Omnislash. If the Omnislash does not happen or there are no units nearby, the other two phases still run. If the Omnislash does happen or there are enemy units nearby the last war stomp phase happens shows the effects relative to where the caster is after Omnislashing, so I can't really put it in the cast trigger.

How about I put it before I de-index the spell, right after TempUnit returns null?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Okay so I updated the Loop 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] --------
              • 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])
                  • Custom script: set udg_ZS_PickedUnit[udg_ZS_CurrentIndex] = FirstOfGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
                  • 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])
                      • 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
                      • 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_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[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] --------
            • Else - Actions


But one problem remains and a new one showed up:
Even with the new trigger, the caster still does the same things he did last time.

And the new problem is when I cast the spell for the first time and TempUnit == null immediately (meaning there are no enemy units nearby), the MUI somehow fails and I can only cast the spell once.

Help.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
change this
  • Custom script: set udg_ZS_PickedUnit[udg_ZS_CurrentIndex] = FirstOfGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
to this and use tempUnit for the other stuff
  • Custom script: set udg_tempUnit = FirstOfGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
change this to tempUnit also
  • ZS_PickedUnit[ZS_CurrentIndex] Equal to No unit
tempPoint and tempGroup should not be arrays. they are temp variables. making them arrays is unnecessary and not good to do. any temp variable shouldnt be an array.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Oh cool. I'll try that out as soon as I can!

But after which, is that the only thing I need to do or change?

EDIT: I changed the ZS_TempGroup2[ZS_CurrentIndex] to ZS_TempGroup. But the problem is still there:
[hidden="Show:]
  • 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 = (Random 1 units from ZS_TempGroup1[ZS_CurrentIndex])
                  • Custom script: set udg_ZS_PickedUnit[udg_ZS_CurrentIndex] = FirstOfGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
                  • 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])
                      • 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
                      • 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 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[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] --------
            • Else - Actions
[/hidden]
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
change tempPoint also.
get rid of this
  • Set ZS_CurrentIndex = (ZS_CurrentIndex - 1)
the problem is that the u need to
  • Set ZS_Counter[ ZS_CurrentIndex] = 0
after it hits 30.
basically what is happening now is its hitting 30 then its always above 30 so it keeps running the trigger.
put that as the first action in the then block also change the condition to greater than or equal to 30. always use greater /less than and equal to.
only time u dont use this is when u need the exact number. in this case we dont.

Also change this.
  • 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]
it is a very bad idea to create 30 units everytime. u can instead create 1 dummy unit b4 the loop. then move that unit instantly to the point u need to move him to then do actions. after the loop u remove the unit.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Okay; I have updated the trigger again, but now I can't test the map because it won't load again. Anyways the Loop 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_CurrentIndex] = (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[udg_ZS_CurrentIndex])
                  • 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[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 = (Random 1 units from ZS_TempGroup1[ZS_CurrentIndex])
                  • 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_CurrentIndex] = (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[udg_ZS_CurrentIndex])
                          • 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[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
                      • 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 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[udg_ZS_CurrentIndex])
                          • 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[udg_ZS_CurrentIndex])
                          • Custom script: call DestroyGroup( udg_ZS_TempGroup2)
                          • Set ZS_Omniboolean[ZS_CurrentIndex] = False
              • -------- [END] Omnislash[END] --------
            • Else - Actions
 
Level 29
Joined
Oct 24, 2012
Messages
6,543

  • 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 = (Random 1 units from ZS_TempGroup1[ZS_CurrentIndex])
      • 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_CurrentIndex] = (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[udg_ZS_CurrentIndex])
              • 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[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)
plz change all this first. make the tempPoint and tempGroup1 and tempGroup2. Also note if this is for something on here u probably need the proper naming. note how i write tempPoint and not TempPoint. Also all the others should be fixed. There are some after this i didnt fix. You should be able to fix them.
  • For each (Integer ZS_LoopInt) from 1 to ZS_Omnislash_Loop, do (Actions)
    • Loop - Actions
      • Set 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 tempGroup2 = (Random 1 units from tempGroup1[ZS_CurrentIndex])
      • Custom script: set udg_tempPickedUnit = FirstOfGroup( udg_tempGroup2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempPickedUnit 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 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_tempPoint)
              • Animation - Add the birth animation tag to ZS_Dummy
              • Animation - Play ZS_Dummy's birth animation
              • Custom script: call RemoveLocation(udg_tempPoint)
          • Unit - Remove ZS_Dummy from the game
          • Unit Group - Pick every unit in 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_tempGroup1)
          • Custom script: set udg_tempGroup = null
          • Custom script: set udg_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)
 
Status
Not open for further replies.
Top