• 🏆 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] Fixing MUI Loop

Status
Not open for further replies.
Level 19
Joined
Jun 16, 2007
Messages
1,574
I know i'm missing a few lines to completely make this trigger MUI, but i'm not sure what it is lol... I usually have a MUI spell i look at so i can fix any errors. But lost my base file for them haha.

Errors which happen:
- On 2nd cast balls don't move
- No more then 1 unit can cast this spell
- Removes other casting units balls, when first casting finishes.

  • RenzokuED 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [Q] Renzoku Kikou Dan (V2)
    • Actions
      • -------- Setup Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RenzokuED_Index1 Equal to 0
        • Then - Actions
          • Trigger - Turn on RenzokuED 2 <gen>
        • Else - Actions
      • -------- Setup Variables --------
      • Set RenzokuED_Index1 = (RenzokuED_Index1 + 1)
      • Set RenzokuED_Index2 = (RenzokuED_Index2 + 1)
      • Set RenzokuED_Timer[RenzokuED_Index2] = 21
      • Set RenzokuED_Caster[RenzokuED_Index2] = (Triggering unit)
      • Set RenzokuED_Target[RenzokuED_Index2] = (Target unit of ability being cast)
      • Set RenzokuED_R_L[RenzokuED_Index2] = 1
      • -------- Setup Ball Amount (This will be used for casting amount) --------
      • Set RenzokuED_Balls[RenzokuED_Index2] = (5 x (Level of [Q] Renzoku Kikou Dan (V2) for RenzokuED_Caster[RenzokuED_Index2]))
      • Animation - Play RenzokuED_Caster[RenzokuED_Index2]'s Spell Swim animation
      • -------- Setup Damage --------
      • Set RenzokuED_Damage[RenzokuED_Index2] = (Real(((Intelligence of RenzokuED_Caster[RenzokuED_Index2] (Exclude bonuses)) / RenzokuED_Balls[RenzokuED_Index2])))
  • RenzokuED 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer RenzokuED_MUI) from 1 to RenzokuED_Index2, do (Actions)
        • Loop - Actions
          • Unit - Make RenzokuED_Caster[RenzokuED_MUI] face RenzokuED_Target[RenzokuED_MUI] over 0.00 seconds
          • Set RenzokuED_Timer[RenzokuED_MUI] = (RenzokuED_Timer[RenzokuED_MUI] - 3)
          • -------- Move Unit --------
          • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
            • Loop - Actions
              • -------- Remove Unit --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Life of (Picked unit)) Less than or equal to 1.00
                • Then - Actions
                  • Unit - Remove (Picked unit) from the game
                • Else - Actions
              • -------- Move Unit + Remove Doodad --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Set RenzokuED_Temp2[RenzokuED_MUI] = ((Position of (Picked unit)) offset by 35.00 towards (Facing of (Picked unit)) degrees)
                  • Unit - Move (Picked unit) instantly to RenzokuED_Temp2[RenzokuED_MUI]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Region centered at RenzokuED_Temp2[RenzokuED_MUI] with size (50.00, 50.00)) contains RenzokuED_Target[RenzokuED_MUI]) Equal to True
                    • Then - Actions
                      • Unit - Remove (Picked unit) from the game
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_MUI])
                  • Set RenzokuED_Temp2[RenzokuED_MUI] = (Position of (Picked unit))
                  • Destructible - Pick every destructible in (Region centered at RenzokuED_Temp2[RenzokuED_MUI] with size (100.00, 100.00)) and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                  • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_MUI])
                • Else - Actions
          • Unit Group - Pick every unit in (Units within 50.00 of (Position of (Random unit from RenzokuED_BallGroup[RenzokuED_MUI])) matching ((((Matching unit) belongs to an enemy of (Owner of RenzokuED_Caster[RenzokuED_MUI])) Equal to True) or ((Matching unit) Equal to RenzokuED_Target[RenzokuED_MU and do (Actions)
            • Loop - Actions
              • Unit - Cause RenzokuED_Caster[RenzokuED_MUI] to damage (Picked unit), dealing RenzokuED_Damage[RenzokuED_MUI] damage of attack type Chaos and damage type Force
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FragDriller\FragDriller.mdl
              • Set RenzokuED_SEffect[RenzokuED_MUI] = (Last created special effect)
              • Special Effect - Destroy RenzokuED_SEffect[RenzokuED_MUI]
          • -------- Remove Unit --------
          • -------- Create Unit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RenzokuED_Balls[RenzokuED_MUI] Greater than or equal to 1
              • RenzokuED_Timer[RenzokuED_MUI] Less than or equal to 0
            • Then - Actions
              • -------- Creating Units --------
              • Set RenzokuED_Timer[RenzokuED_MUI] = 60
              • -------- 1 = Right and 2 = Left | Creates Dummy between (Facing Angle Of Casting Unit -- / + random number betwween 5 to 25) --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RenzokuED_R_L[RenzokuED_MUI] Equal to 1
                • Then - Actions
                  • Set RenzokuED_Temp1[RenzokuED_MUI] = ((Position of RenzokuED_Caster[RenzokuED_MUI]) offset by 100.00 towards ((Facing of RenzokuED_Caster[RenzokuED_MUI]) - (Random real number between 5.00 and 25.00)) degrees)
                  • Unit - Create 1 Renzoku_Dummy for (Owner of RenzokuED_Caster[RenzokuED_MUI]) at RenzokuED_Temp1[RenzokuED_MUI] facing (Facing of RenzokuED_Caster[RenzokuED_MUI]) degrees
                  • Unit - Add a 0.90 second Generic expiration timer to (Last created unit)
                  • Set RenzokuED_R_L[RenzokuED_MUI] = 2
                • Else - Actions
                  • Set RenzokuED_Temp1[RenzokuED_MUI] = ((Position of RenzokuED_Caster[RenzokuED_MUI]) offset by 100.00 towards ((Facing of RenzokuED_Caster[RenzokuED_MUI]) + (Random real number between 5.00 and 25.00)) degrees)
                  • Unit - Create 1 Renzoku_Dummy for (Owner of RenzokuED_Caster[RenzokuED_MUI]) at RenzokuED_Temp1[RenzokuED_MUI] facing (Facing of RenzokuED_Caster[RenzokuED_MUI]) degrees
                  • Unit - Add a 0.90 second Generic expiration timer to (Last created unit)
                  • Set RenzokuED_R_L[RenzokuED_MUI] = 1
              • Sound - Play gg_snd_RenzokuED_Sound at 100.00% volume, attached to (Last created unit)
              • Set RenzokuED_Sound[RenzokuED_Index2] = (Last played sound)
              • Unit Group - Add (Last created unit) to RenzokuED_BallGroup[RenzokuED_MUI]
              • Set RenzokuED_Balls[RenzokuED_MUI] = (RenzokuED_Balls[RenzokuED_MUI] - 1)
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_MUI])
            • Else - Actions
          • -------- Ends Trigger --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (RenzokuED_Balls[RenzokuED_MUI] Less than or equal to 0) and ((All units of RenzokuED_BallGroup[RenzokuED_MUI] are dead) Equal to True)
                  • (RenzokuED_Target[RenzokuED_MUI] is in (Units within 1200.00 of (Position of RenzokuED_Caster[RenzokuED_MUI]))) Equal to False
                  • (RenzokuED_Balls[RenzokuED_MUI] Less than or equal to 0) and ((RenzokuED_BallGroup[RenzokuED_MUI] is empty) Equal to True)
                  • (RenzokuED_Caster[RenzokuED_MUI] is Stunned) Equal to True
                  • (RenzokuED_Target[RenzokuED_MUI] is dead) Equal to True
                  • (RenzokuED_Caster[RenzokuED_MUI] is dead) Equal to True
            • Then - Actions
              • Sound - Stop RenzokuED_Sound[RenzokuED_MUI] Immediately
              • Sound - Destroy RenzokuED_Sound[RenzokuED_MUI]
              • Animation - Play RenzokuED_Caster[RenzokuED_MUI]'s stand animation
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_MUI])
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_MUI])
              • Set RenzokuED_Index2 = (RenzokuED_Index2 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RenzokuED_Index2 Equal to 0
                • Then - Actions
                  • Set RenzokuED_Index1 = 0
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
What you can do, is set the last index of the spell to the currently finished index.

Here's an example:
Say there are 10 instances of the spell running, and number 6 just finished.
Set SpellDamage[currentIndex] = SpellDamage[lastIndex]
Set SpellTimer[currentIndex] = SpellTimer[lastIndex]
Set lastIndex = lastIndex - 1

This way, instance number 6 will be removed, and replaced with instance number 10.
So effectively, there are now 9 instances (and #6 is the previous #10).

In your trigger, this means that you should replace Renzoku_Caster/Timer/Target/R_L and all those things the way I did it in the above example.
I hope you can get this to work.
Good luck :).

There are also a few leaks: some unit groups, some locations. Make sure you remove them.

Last note: I don't really see the use for "RenzokuED_Index1". Seems like an obsolete variable to me.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
What you can do, is set the last index of the spell to the currently finished index.

Here's an example:
Say there are 10 instances of the spell running, and number 6 just finished.
Set SpellDamage[currentIndex] = SpellDamage[lastIndex]
Set SpellTimer[currentIndex] = SpellTimer[lastIndex]
Set lastIndex = lastIndex - 1

This way, instance number 6 will be removed, and replaced with instance number 10.
So effectively, there are now 9 instances (and #6 is the previous #10).

In your trigger, this means that you should replace Renzoku_Caster/Timer/Target/R_L and all those things the way I did it in the above example.
I hope you can get this to work.
Good luck :).

There are also a few leaks: some unit groups, some locations. Make sure you remove them.

Last note: I don't really see the use for "RenzokuED_Index1". Seems like an obsolete variable to me.

I'll tweak it later on with "LastIndex" and "CurrentIndex" and see how it goes.

Yeah it's the way i learned MUI with "Index1" and "Index2". All my old spells used to be done in that format.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
I've done what you've suggest but i'm still getting the same errors.


  • RenzokuED 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [Q] Renzoku Kikou Dan (V2)
    • Actions
      • -------- Setup Variables --------
      • Set RenzokuED_MaxInd = (RenzokuED_MaxInd + 1)
      • Set RenzokuED_Timer[RenzokuED_MaxInd] = 21
      • Set RenzokuED_Caster[RenzokuED_MaxInd] = (Triggering unit)
      • Set RenzokuED_Target[RenzokuED_MaxInd] = (Target unit of ability being cast)
      • Set RenzokuED_R_L[RenzokuED_MaxInd] = 1
      • -------- Setup Ball Amount (This will be used for casting amount) --------
      • Set RenzokuED_Balls[RenzokuED_MaxInd] = (5 x (Level of [Q] Renzoku Kikou Dan (V2) for RenzokuED_Caster[RenzokuED_MaxInd]))
      • Animation - Play RenzokuED_Caster[RenzokuED_MaxInd]'s Spell Swim animation
      • -------- Setup Damage --------
      • Set RenzokuED_Damage[RenzokuED_MaxInd] = (Real(((Intelligence of RenzokuED_Caster[RenzokuED_MaxInd] (Exclude bonuses)) / RenzokuED_Balls[RenzokuED_MaxInd])))
      • -------- Setup Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RenzokuED_MaxInd Equal to 1
        • Then - Actions
          • Trigger - Turn on RenzokuED 2 <gen>
        • Else - Actions



  • RenzokuED 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer RenzokuED_CurrentInd) from 1 to RenzokuED_MaxInd, do (Actions)
        • Loop - Actions
          • Unit - Make RenzokuED_Caster[RenzokuED_CurrentInd] face RenzokuED_Target[RenzokuED_CurrentInd] over 0.00 seconds
          • Set RenzokuED_Timer[RenzokuED_CurrentInd] = (RenzokuED_Timer[RenzokuED_CurrentInd] - 3)
          • -------- Move Unit --------
          • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_CurrentInd] and do (Actions)
            • Loop - Actions
              • -------- Remove Unit --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Life of (Picked unit)) Less than or equal to 1.00
                • Then - Actions
                  • Unit - Remove (Picked unit) from the game
                • Else - Actions
              • -------- Move Unit + Remove Doodad --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Set RenzokuED_Temp2[RenzokuED_CurrentInd] = ((Position of (Picked unit)) offset by 35.00 towards (Facing of (Picked unit)) degrees)
                  • Unit - Move (Picked unit) instantly to RenzokuED_Temp2[RenzokuED_CurrentInd]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Region centered at RenzokuED_Temp2[RenzokuED_CurrentInd] with size (50.00, 50.00)) contains RenzokuED_Target[RenzokuED_CurrentInd]) Equal to True
                    • Then - Actions
                      • Unit - Remove (Picked unit) from the game
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_CurrentInd])
                  • Set RenzokuED_Temp2[RenzokuED_CurrentInd] = (Position of (Picked unit))
                  • Destructible - Pick every destructible in (Region centered at RenzokuED_Temp2[RenzokuED_CurrentInd] with size (100.00, 100.00)) and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                  • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_CurrentInd])
                • Else - Actions
          • Unit Group - Pick every unit in (Units within 50.00 of (Position of (Random unit from RenzokuED_BallGroup[RenzokuED_CurrentInd])) matching ((((Matching unit) belongs to an enemy of (Owner of RenzokuED_Caster[RenzokuED_CurrentInd])) Equal to True) or ((Matching unit) Equal to RenzokuED_Targe and do (Actions)
            • Loop - Actions
              • Unit - Cause RenzokuED_Caster[RenzokuED_CurrentInd] to damage (Picked unit), dealing RenzokuED_Damage[RenzokuED_CurrentInd] damage of attack type Chaos and damage type Force
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FragDriller\FragDriller.mdl
              • Set RenzokuED_SEffect[RenzokuED_CurrentInd] = (Last created special effect)
              • Special Effect - Destroy RenzokuED_SEffect[RenzokuED_CurrentInd]
          • -------- Remove Unit --------
          • -------- Create Unit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RenzokuED_Balls[RenzokuED_CurrentInd] Greater than or equal to 1
              • RenzokuED_Timer[RenzokuED_CurrentInd] Less than or equal to 0
            • Then - Actions
              • -------- Creating Units --------
              • Set RenzokuED_Timer[RenzokuED_CurrentInd] = 60
              • -------- 1 = Right and 2 = Left | Creates Dummy between (Facing Angle Of Casting Unit -- / + random number betwween 5 to 25) --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RenzokuED_R_L[RenzokuED_CurrentInd] Equal to 1
                • Then - Actions
                  • Set RenzokuED_Temp1[RenzokuED_CurrentInd] = ((Position of RenzokuED_Caster[RenzokuED_CurrentInd]) offset by 100.00 towards ((Facing of RenzokuED_Caster[RenzokuED_CurrentInd]) - (Random real number between 5.00 and 25.00)) degrees)
                  • Unit - Create 1 Renzoku_Dummy for (Owner of RenzokuED_Caster[RenzokuED_CurrentInd]) at RenzokuED_Temp1[RenzokuED_CurrentInd] facing (Facing of RenzokuED_Caster[RenzokuED_CurrentInd]) degrees
                  • Unit - Add a 0.90 second Generic expiration timer to (Last created unit)
                  • Set RenzokuED_R_L[RenzokuED_CurrentInd] = 2
                • Else - Actions
                  • Set RenzokuED_Temp1[RenzokuED_CurrentInd] = ((Position of RenzokuED_Caster[RenzokuED_CurrentInd]) offset by 100.00 towards ((Facing of RenzokuED_Caster[RenzokuED_CurrentInd]) + (Random real number between 5.00 and 25.00)) degrees)
                  • Unit - Create 1 Renzoku_Dummy for (Owner of RenzokuED_Caster[RenzokuED_CurrentInd]) at RenzokuED_Temp1[RenzokuED_CurrentInd] facing (Facing of RenzokuED_Caster[RenzokuED_CurrentInd]) degrees
                  • Unit - Add a 0.90 second Generic expiration timer to (Last created unit)
                  • Set RenzokuED_R_L[RenzokuED_CurrentInd] = 1
              • Sound - Play gg_snd_RenzokuED_Sound at 100.00% volume, attached to (Last created unit)
              • Set RenzokuED_Sound[RenzokuED_MaxInd] = (Last played sound)
              • Unit Group - Add (Last created unit) to RenzokuED_BallGroup[RenzokuED_CurrentInd]
              • Set RenzokuED_Balls[RenzokuED_CurrentInd] = (RenzokuED_Balls[RenzokuED_CurrentInd] - 1)
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_CurrentInd])
            • Else - Actions
          • -------- Ends Trigger --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (RenzokuED_Balls[RenzokuED_CurrentInd] Less than or equal to 0) and ((All units of RenzokuED_BallGroup[RenzokuED_CurrentInd] are dead) Equal to True)
                  • (RenzokuED_Target[RenzokuED_CurrentInd] is in (Units within 1200.00 of (Position of RenzokuED_Caster[RenzokuED_CurrentInd]))) Equal to False
                  • (RenzokuED_Balls[RenzokuED_CurrentInd] Less than or equal to 0) and ((RenzokuED_BallGroup[RenzokuED_CurrentInd] is empty) Equal to True)
                  • (RenzokuED_Caster[RenzokuED_CurrentInd] is Stunned) Equal to True
                  • (RenzokuED_Target[RenzokuED_CurrentInd] is dead) Equal to True
                  • (RenzokuED_Caster[RenzokuED_CurrentInd] is dead) Equal to True
            • Then - Actions
              • Sound - Stop RenzokuED_Sound[RenzokuED_CurrentInd] Immediately
              • Sound - Destroy RenzokuED_Sound[RenzokuED_CurrentInd]
              • Animation - Play RenzokuED_Caster[RenzokuED_CurrentInd]'s stand animation
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_CurrentInd] and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_CurrentInd])
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_CurrentInd])
              • Set RenzokuED_Timer[RenzokuED_CurrentInd] = RenzokuED_Timer[RenzokuED_MaxInd]
              • Set RenzokuED_Caster[RenzokuED_CurrentInd] = RenzokuED_Caster[RenzokuED_MaxInd]
              • Set RenzokuED_Target[RenzokuED_CurrentInd] = RenzokuED_Target[RenzokuED_MaxInd]
              • Set RenzokuED_R_L[RenzokuED_CurrentInd] = RenzokuED_R_L[RenzokuED_MaxInd]
              • Set RenzokuED_MaxInd = (RenzokuED_MaxInd - 1)
              • Set RenzokuED_CurrentInd = (RenzokuED_CurrentInd - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RenzokuED_MaxInd Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions


Errors:
- Works once
- Blasts only move for one player
- Blasts don't move after first cast
 
Last edited:
Level 7
Joined
Jan 22, 2013
Messages
293
I've done what you've suggest but i'm still getting the same errors.


  • RenzokuED 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [Q] Renzoku Kikou Dan (V2)
    • Actions
      • -------- Setup Variables --------
      • Set RenzokuED_MaxInd = (RenzokuED_MaxInd + 1)
      • Set RenzokuED_Timer[RenzokuED_MaxInd] = 21
      • Set RenzokuED_Caster[RenzokuED_MaxInd] = (Triggering unit)
      • Set RenzokuED_Target[RenzokuED_MaxInd] = (Target unit of ability being cast)
      • Set RenzokuED_R_L[RenzokuED_MaxInd] = 1
      • -------- Setup Ball Amount (This will be used for casting amount) --------
      • Set RenzokuED_Balls[RenzokuED_MaxInd] = (5 x (Level of [Q] Renzoku Kikou Dan (V2) for RenzokuED_Caster[RenzokuED_MaxInd]))
      • Animation - Play RenzokuED_Caster[RenzokuED_MaxInd]'s Spell Swim animation
      • -------- Setup Damage --------
      • Set RenzokuED_Damage[RenzokuED_MaxInd] = (Real(((Intelligence of RenzokuED_Caster[RenzokuED_MaxInd] (Exclude bonuses)) / RenzokuED_Balls[RenzokuED_MaxInd])))
      • -------- Setup Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RenzokuED_MaxInd Equal to 1
        • Then - Actions
          • Trigger - Turn on RenzokuED 2 <gen>
        • Else - Actions



  • RenzokuED 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer RenzokuED_CurrentInd) from 1 to RenzokuED_MaxInd, do (Actions)
        • Loop - Actions
          • Unit - Make RenzokuED_Caster[RenzokuED_CurrentInd] face RenzokuED_Target[RenzokuED_CurrentInd] over 0.00 seconds
          • Set RenzokuED_Timer[RenzokuED_CurrentInd] = (RenzokuED_Timer[RenzokuED_CurrentInd] - 3)
          • -------- Move Unit --------
          • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_CurrentInd] and do (Actions)
            • Loop - Actions
              • -------- Remove Unit --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Life of (Picked unit)) Less than or equal to 1.00
                • Then - Actions
                  • Unit - Remove (Picked unit) from the game
                • Else - Actions
              • -------- Move Unit + Remove Doodad --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Set RenzokuED_Temp2[RenzokuED_CurrentInd] = ((Position of (Picked unit)) offset by 35.00 towards (Facing of (Picked unit)) degrees)
                  • Unit - Move (Picked unit) instantly to RenzokuED_Temp2[RenzokuED_CurrentInd]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Region centered at RenzokuED_Temp2[RenzokuED_CurrentInd] with size (50.00, 50.00)) contains RenzokuED_Target[RenzokuED_CurrentInd]) Equal to True
                    • Then - Actions
                      • Unit - Remove (Picked unit) from the game
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_CurrentInd])
                  • Set RenzokuED_Temp2[RenzokuED_CurrentInd] = (Position of (Picked unit))
                  • Destructible - Pick every destructible in (Region centered at RenzokuED_Temp2[RenzokuED_CurrentInd] with size (100.00, 100.00)) and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                  • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_CurrentInd])
                • Else - Actions
          • Unit Group - Pick every unit in (Units within 50.00 of (Position of (Random unit from RenzokuED_BallGroup[RenzokuED_CurrentInd])) matching ((((Matching unit) belongs to an enemy of (Owner of RenzokuED_Caster[RenzokuED_CurrentInd])) Equal to True) or ((Matching unit) Equal to RenzokuED_Targe and do (Actions)
            • Loop - Actions
              • Unit - Cause RenzokuED_Caster[RenzokuED_CurrentInd] to damage (Picked unit), dealing RenzokuED_Damage[RenzokuED_CurrentInd] damage of attack type Chaos and damage type Force
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FragDriller\FragDriller.mdl
              • Set RenzokuED_SEffect[RenzokuED_CurrentInd] = (Last created special effect)
              • Special Effect - Destroy RenzokuED_SEffect[RenzokuED_CurrentInd]
          • -------- Remove Unit --------
          • -------- Create Unit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RenzokuED_Balls[RenzokuED_CurrentInd] Greater than or equal to 1
              • RenzokuED_Timer[RenzokuED_CurrentInd] Less than or equal to 0
            • Then - Actions
              • -------- Creating Units --------
              • Set RenzokuED_Timer[RenzokuED_CurrentInd] = 60
              • -------- 1 = Right and 2 = Left | Creates Dummy between (Facing Angle Of Casting Unit -- / + random number betwween 5 to 25) --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RenzokuED_R_L[RenzokuED_CurrentInd] Equal to 1
                • Then - Actions
                  • Set RenzokuED_Temp1[RenzokuED_CurrentInd] = ((Position of RenzokuED_Caster[RenzokuED_CurrentInd]) offset by 100.00 towards ((Facing of RenzokuED_Caster[RenzokuED_CurrentInd]) - (Random real number between 5.00 and 25.00)) degrees)
                  • Unit - Create 1 Renzoku_Dummy for (Owner of RenzokuED_Caster[RenzokuED_CurrentInd]) at RenzokuED_Temp1[RenzokuED_CurrentInd] facing (Facing of RenzokuED_Caster[RenzokuED_CurrentInd]) degrees
                  • Unit - Add a 0.90 second Generic expiration timer to (Last created unit)
                  • Set RenzokuED_R_L[RenzokuED_CurrentInd] = 2
                • Else - Actions
                  • Set RenzokuED_Temp1[RenzokuED_CurrentInd] = ((Position of RenzokuED_Caster[RenzokuED_CurrentInd]) offset by 100.00 towards ((Facing of RenzokuED_Caster[RenzokuED_CurrentInd]) + (Random real number between 5.00 and 25.00)) degrees)
                  • Unit - Create 1 Renzoku_Dummy for (Owner of RenzokuED_Caster[RenzokuED_CurrentInd]) at RenzokuED_Temp1[RenzokuED_CurrentInd] facing (Facing of RenzokuED_Caster[RenzokuED_CurrentInd]) degrees
                  • Unit - Add a 0.90 second Generic expiration timer to (Last created unit)
                  • Set RenzokuED_R_L[RenzokuED_CurrentInd] = 1
              • Sound - Play gg_snd_RenzokuED_Sound at 100.00% volume, attached to (Last created unit)
              • Set RenzokuED_Sound[RenzokuED_MaxInd] = (Last played sound)
              • Unit Group - Add (Last created unit) to RenzokuED_BallGroup[RenzokuED_CurrentInd]
              • Set RenzokuED_Balls[RenzokuED_CurrentInd] = (RenzokuED_Balls[RenzokuED_CurrentInd] - 1)
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_CurrentInd])
            • Else - Actions
          • -------- Ends Trigger --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (RenzokuED_Balls[RenzokuED_CurrentInd] Less than or equal to 0) and ((All units of RenzokuED_BallGroup[RenzokuED_CurrentInd] are dead) Equal to True)
                  • (RenzokuED_Target[RenzokuED_CurrentInd] is in (Units within 1200.00 of (Position of RenzokuED_Caster[RenzokuED_CurrentInd]))) Equal to False
                  • (RenzokuED_Balls[RenzokuED_CurrentInd] Less than or equal to 0) and ((RenzokuED_BallGroup[RenzokuED_CurrentInd] is empty) Equal to True)
                  • (RenzokuED_Caster[RenzokuED_CurrentInd] is Stunned) Equal to True
                  • (RenzokuED_Target[RenzokuED_CurrentInd] is dead) Equal to True
                  • (RenzokuED_Caster[RenzokuED_CurrentInd] is dead) Equal to True
            • Then - Actions
              • Sound - Stop RenzokuED_Sound[RenzokuED_CurrentInd] Immediately
              • Sound - Destroy RenzokuED_Sound[RenzokuED_CurrentInd]
              • Animation - Play RenzokuED_Caster[RenzokuED_CurrentInd]'s stand animation
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_CurrentInd] and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_CurrentInd])
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_CurrentInd])
              • Set RenzokuED_Timer[RenzokuED_CurrentInd] = RenzokuED_Timer[RenzokuED_MaxInd]
              • Set RenzokuED_Caster[RenzokuED_CurrentInd] = RenzokuED_Caster[RenzokuED_MaxInd]
              • Set RenzokuED_Target[RenzokuED_CurrentInd] = RenzokuED_Target[RenzokuED_MaxInd]
              • Set RenzokuED_R_L[RenzokuED_CurrentInd] = RenzokuED_R_L[RenzokuED_MaxInd]
              • Set RenzokuED_MaxInd = (RenzokuED_MaxInd - 1)
              • Set RenzokuED_CurrentInd = (RenzokuED_CurrentInd - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RenzokuED_MaxInd Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions


Errors:
- Works once
- Blasts only move for one player
- Blasts don't move after first cast

Hi robo dude, I will fix it after im done making dinner bro. I will be back in like half an hour.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
Currently doing the "Debug Text" which " Orthane " suggested via pm,

Managed too fix one error: (Works only once, now it will keep working after cast after cast) For some reason it didn't like to have this custom script above one of my unit groups.
  • Custom script: set bj_wantDestroyGroup = true
Now just need too fix the issue with the 2nd unit casting at the same time. It's still not moving 2nd units dummies.

Also changed "CurrentId" and "MaxId" back too "Index1, Index2, MUI".

Edit:
Errors still left:
- If first caster finishes casting, 2nd casters dummies will stopped being created
- 2nd Casters dummies won't move whilst, 1st caster is casting.

So far they've too take it in turns to cast lol....
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
it didnt work with that because u only use that when u dont create ur own unit group variable.
if u create ur own variable u need custom script: call DestroyGroup( udg_ur_group)

When i added in
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[RenzokuED_MUI])
It just gives errors when compiling in newgen.

Still don't understand why, only one unit can cast at the same time.
 
Level 7
Joined
Jan 22, 2013
Messages
293
When i added in
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[RenzokuED_MUI])
It just gives errors when compiling in newgen.

Still don't understand why, only one unit can cast at the same time.


Robo, the issue is that you didn't add udg_to the integer variable


Your destroying the wrong group. This is the right one

call DestroyGroup( udg_RenzokuED_BallGroup[RenzokuED_CurrentInd])
^^^^ I can't believe you missed this, your the one who showed me this lol.

Here:
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_CurrentInd])
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
you can thank me later (whatever one your using). I promise on my life editor won't bust your chops on it.

Shit if you wanted here I can make the newgen say YES WE CAN to this.

  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_CurrentInd[udg_Integer1[udg_Ipeeinyourpoo[MaxIndex]]]])
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
Robo, the issue is that you didn't add udg_to the integer variable



^^^^ I can't believe you missed this, your the one who showed me this lol.

Here:
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_CurrentInd])
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
you can thank me later (whatever one your using). I promise on my life editor won't bust your chops on it.

Thanks however after adding them in like this:
  • -------- Move Unit --------
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
  • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
  • -------- Damage --------
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
  • Unit Group - Pick every unit in (Units within 50.00 of (Position of (Random unit from RenzokuED_BallGroup[RenzokuED_MUI])) matching ((((Matching unit) belongs to an enemy of (Owner of RenzokuED_Caster[RenzokuED_MUI])) Equal to True) or ((Matching unit) Equal to RenzokuED_Target[RenzokuED_MU and do (Actions)
  • -------- Ends Trigger --------
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
  • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
All it does is create this error:
- No dummy movement for any casting unit

Even if i place the custom script like this:
  • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_MUI])
  • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_MUI])
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
It stops any casting too work after the first cast.
 
Level 7
Joined
Jan 22, 2013
Messages
293
  • -------- Move Unit --------
  • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
  • Custom script: set udg_RenzokuED_BallGroup[udg_RenzokuED_MUI] = null
  • -------- Damage --------
  • Unit Group - Pick every unit in (Units within 50.00 of (Position of (Random unit from RenzokuED_BallGroup[RenzokuED_MUI])) matching ((((Matching unit) belongs to an enemy of (Owner of RenzokuED_Caster[RenzokuED_MUI])) Equal to True) or ((Matching unit) Equal to RenzokuED_Target[RenzokuED_MU and do (Actions)
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
  • Custom script: set udg_RenzokuED_BallGroup[udg_RenzokuED_MUI] = null
  • -------- Ends Trigger --------
  • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
  • Custom script: set udg_RenzokuED_BallGroup[udg_RenzokuED_MUI] = null
EDIT: you should also Null them if you mass using them like that (or at least I do)

You know the customscript needs to be below not above it right?
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
You know the customscript needs to be below not above it right?

Only turn off Trigger goes above.

I've seen different scripts with the DestroyGroup above the group, and after placing the "DestroyGroup custom sscript" below the groups.

It still stops all movement off the dummys, so nothing has changed from above or below groups.

Just going to remove this custom script as it's only causing errors.

Now just need to find out why only one unit can cast at a time.
 
Level 7
Joined
Jan 22, 2013
Messages
293
I've seen different scripts with the DestroyGroup above the group, and after placing the "DestroyGroup custom sscript" below the groups.

It still stops all movement off the dummys, so nothing has changed from above or below groups.

Just going to remove this custom script as it's only causing errors.

Now just need to find out why only one unit can cast at a time.

Those are not errors keep them in. You clearly have to have a missed order somewhere in the indexing or the Dummies. run another debug text but start checking the Indexing for the Dummies.

if the indexing is correct then its a problem with it grabbing the right units. And if its grabbing the right units, then something in conditions is preventing the orders from being executed for dummies.

If its none of the above then I don't know what to say to you, however for only having a single unit able to cast the spell, that's a obvious red flag why the dummies might not be working, your entire system is set up for that to work meaning "THERE IS INDEED A INDEX PROBLEM" I hate being the bringer of bad news, start checking for the index numbers at each stage, label each stage with what the number "Should be" at that period of time.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
Those are not errors keep them in. You clearly have to have a missed order somewhere in the indexing or the Dummies. run another debug text but start checking the Indexing for the Dummies.

if the indexing is correct then its a problem with it grabbing the right units. And if its grabbing the right units, then something in conditions is preventing the orders from being executed for dummies.

If its none of the above then I don't know what to say to you, however for only having a single unit able to cast the spell, that's a obvious red flag why the dummies might not be working, your entire system is set up for that to work meaning "THERE IS INDEED A INDEX PROBLEM" I hate being the bringer of bad news, start checking for the index numbers at each stage, label each stage with what the number "Should be" at that period of time.

  • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
    • Loop - Actions
      • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: Debug: Units Moving
      • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 35.00 towards (Facing of (Picked unit)) degrees)
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
Disabled other stuff in movement of the units, which were only detect units in the area and doodads.

In game this event doesn't even run, with the custom script.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
set bjWantDestroyGroup goes above call DestroyGroup goes below.
the bjWantDestroyGroup is for unit groups created by blizzard.
the call DestroyGroup is for groups that you create. which this is the one u should use.

you problem is above the the unit groups then plz update trigger with the call DestroyGroup and post the new trigger.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
Here's an up to date version off the trigger so far:


  • RenzokuED 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [Q] Renzoku Kikou Dan (V2)
    • Actions
      • Game - Display to (All players) the text: RenzokuED 1 is runn...
      • -------- Setup Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RenzokuED_Index1 Equal to 0
        • Then - Actions
          • Trigger - Turn on RenzokuED 2 <gen>
        • Else - Actions
      • -------- Setup Variables --------
      • Set RenzokuED_Index1 = (RenzokuED_Index1 + 1)
      • Set RenzokuED_Index2 = (RenzokuED_Index2 + 1)
      • Set RenzokuED_Timer[RenzokuED_Index2] = 21
      • Set RenzokuED_Caster[RenzokuED_Index2] = (Triggering unit)
      • Set RenzokuED_Target[RenzokuED_Index2] = (Target unit of ability being cast)
      • Set RenzokuED_R_L[RenzokuED_Index2] = 1
      • -------- Setup Ball Amount (This will be used for casting amount) --------
      • Set RenzokuED_Balls[RenzokuED_Index2] = (5 x (Level of [Q] Renzoku Kikou Dan (V2) for RenzokuED_Caster[RenzokuED_Index2]))
      • Animation - Play RenzokuED_Caster[RenzokuED_Index2]'s Spell Swim animation
      • -------- Setup Damage --------
      • Set RenzokuED_Damage[RenzokuED_Index2] = (Real(((Intelligence of RenzokuED_Caster[RenzokuED_Index2] (Exclude bonuses)) / RenzokuED_Balls[RenzokuED_Index2])))



  • RenzokuED 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: RenzokuED 2 is runn...
      • For each (Integer RenzokuED_MUI) from 1 to RenzokuED_Index2, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (String(RenzokuED_MUI))
          • Unit - Make RenzokuED_Caster[RenzokuED_MUI] face RenzokuED_Target[RenzokuED_MUI] over 0.00 seconds
          • Set RenzokuED_Timer[RenzokuED_MUI] = (RenzokuED_Timer[RenzokuED_MUI] - 3)
          • -------- Create Unit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RenzokuED_Balls[RenzokuED_MUI] Greater than or equal to 1
              • RenzokuED_Timer[RenzokuED_MUI] Less than or equal to 0
            • Then - Actions
              • -------- Creating Units --------
              • Set RenzokuED_Timer[RenzokuED_MUI] = 60
              • -------- 1 = Right | 2 = Left | Creates Dummy between (Facing Angle Of Casting Unit -- / + random number betwween 5 to 25) --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RenzokuED_R_L[RenzokuED_MUI] Equal to 1
                • Then - Actions
                  • Set RenzokuED_Temp1[RenzokuED_MUI] = ((Position of RenzokuED_Caster[RenzokuED_MUI]) offset by 100.00 towards ((Facing of RenzokuED_Caster[RenzokuED_MUI]) - (Random real number between 5.00 and 20.00)) degrees)
                  • Unit - Create 1 Renzoku_Dummy for (Owner of RenzokuED_Caster[RenzokuED_MUI]) at RenzokuED_Temp1[RenzokuED_MUI] facing (Facing of RenzokuED_Caster[RenzokuED_MUI]) degrees
                  • Unit - Add a 0.90 second Generic expiration timer to (Last created unit)
                  • Set RenzokuED_R_L[RenzokuED_MUI] = 2
                  • Game - Display to (All players) the text: RenzokuED 2 is crea...
                • Else - Actions
                  • Set RenzokuED_Temp1[RenzokuED_MUI] = ((Position of RenzokuED_Caster[RenzokuED_MUI]) offset by 100.00 towards ((Facing of RenzokuED_Caster[RenzokuED_MUI]) + (Random real number between 10.00 and 25.00)) degrees)
                  • Unit - Create 1 Renzoku_Dummy for (Owner of RenzokuED_Caster[RenzokuED_MUI]) at RenzokuED_Temp1[RenzokuED_MUI] facing (Facing of RenzokuED_Caster[RenzokuED_MUI]) degrees
                  • Unit - Add a 0.90 second Generic expiration timer to (Last created unit)
                  • Set RenzokuED_R_L[RenzokuED_MUI] = 1
                  • Game - Display to (All players) the text: RenzokuED 2 is crea...
              • Sound - Play gg_snd_RenzokuED_Sound at 100.00% volume, attached to (Last created unit)
              • Set RenzokuED_Sound[RenzokuED_Index2] = (Last played sound)
              • Unit Group - Add (Last created unit) to RenzokuED_BallGroup[RenzokuED_MUI]
              • Set RenzokuED_Balls[RenzokuED_MUI] = (RenzokuED_Balls[RenzokuED_MUI] - 1)
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_MUI])
            • Else - Actions
          • -------- Move Unit --------
          • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
            • Loop - Actions
              • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: Debug: Units Moving
              • -------- Remove Unit --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Life of (Picked unit)) Less than or equal to 1.00
                • Then - Actions
                  • Unit - Remove (Picked unit) from the game
                  • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: Debug: Unit removed
                • Else - Actions
                  • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: Debug: no unit remo...
              • -------- Move Unit + Remove Doodad --------
              • Set RenzokuED_Temp2[RenzokuED_MUI] = ((Position of (Picked unit)) offset by 35.00 towards (Facing of (Picked unit)) degrees)
              • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 35.00 towards (Facing of (Picked unit)) degrees)
              • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: (String((Distance between (Position of (Picked unit)) and (Position of RenzokuED_Target[RenzokuED_MUI]))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Region centered at RenzokuED_Temp2[RenzokuED_MUI] with size (50.00, 50.00)) contains RenzokuED_Target[RenzokuED_MUI]) Equal to True
                • Then - Actions
                  • Unit - Remove (Picked unit) from the game
                  • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: Debug: Unit removed
                • Else - Actions
                  • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: Debug: no unit remo...
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_MUI])
              • Set RenzokuED_Temp2[RenzokuED_MUI] = (Position of (Picked unit))
              • Destructible - Pick every destructible in (Region centered at RenzokuED_Temp2[RenzokuED_MUI] with size (100.00, 100.00)) and do (Actions)
                • Loop - Actions
                  • Destructible - Kill (Picked destructible)
                  • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: Debug: Killing Dood...
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_MUI])
          • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
          • -------- Damage --------
          • Unit Group - Pick every unit in (Units within 50.00 of (Position of (Random unit from RenzokuED_BallGroup[RenzokuED_MUI])) matching ((((Matching unit) belongs to an enemy of (Owner of RenzokuED_Caster[RenzokuED_MUI])) Equal to True) or ((Matching unit) Equal to RenzokuED_Target[RenzokuED_MU and do (Actions)
            • Loop - Actions
              • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: Debug: Damaging Unit
              • Unit - Cause RenzokuED_Caster[RenzokuED_MUI] to damage (Picked unit), dealing RenzokuED_Damage[RenzokuED_MUI] damage of attack type Chaos and damage type Force
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FragDriller\FragDriller.mdl
              • Set RenzokuED_SEffect[RenzokuED_MUI] = (Last created special effect)
              • Special Effect - Destroy RenzokuED_SEffect[RenzokuED_MUI]
          • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
          • -------- Ends Trigger --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (RenzokuED_Balls[RenzokuED_MUI] Less than or equal to 0) and ((All units of RenzokuED_BallGroup[RenzokuED_MUI] are dead) Equal to True)
                  • (RenzokuED_Target[RenzokuED_MUI] is in (Units within 1200.00 of (Position of RenzokuED_Caster[RenzokuED_MUI]))) Equal to False
                  • (RenzokuED_Balls[RenzokuED_MUI] Less than or equal to 0) and ((RenzokuED_BallGroup[RenzokuED_MUI] is empty) Equal to True)
                  • (RenzokuED_Caster[RenzokuED_MUI] is Stunned) Equal to True
                  • (RenzokuED_Target[RenzokuED_MUI] is dead) Equal to True
                  • (RenzokuED_Caster[RenzokuED_MUI] is dead) Equal to True
            • Then - Actions
              • Sound - Stop RenzokuED_Sound[RenzokuED_MUI] Immediately
              • Sound - Destroy RenzokuED_Sound[RenzokuED_MUI]
              • Animation - Play RenzokuED_Caster[RenzokuED_MUI]'s stand animation
              • Unit Group - Pick every unit in RenzokuED_BallGroup[RenzokuED_MUI] and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
                  • Game - Display to (Player group((Owner of RenzokuED_Caster[RenzokuED_MUI]))) the text: (String((Number of units in RenzokuED_BallGroup[RenzokuED_MUI])))
                  • Game - Display to Player Group - Player 1 (Red) the text: (MUI = + (String(RenzokuED_MUI)))
              • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
              • -------- Remove Temp points --------
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp1[udg_RenzokuED_MUI])
              • Custom script: call RemoveLocation(udg_RenzokuED_Temp2[udg_RenzokuED_MUI])
              • Set RenzokuED_Index1 = (RenzokuED_Index1 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RenzokuED_Index1 Equal to 0
                • Then - Actions
                  • Set RenzokuED_Index2 = 0
                  • Trigger - Turn off (This trigger)
                  • Game - Display to (All players) the text: RenzokuED 2 has sto...
                • Else - Actions
            • Else - Actions


Issues/Errors:
- Dummy's don't move now
- When two instances run, and one finishes before the other all units are removed
 
Level 7
Joined
Jan 22, 2013
Messages
293
set bjWantDestroyGroup goes above call DestroyGroup goes below.
the bjWantDestroyGroup is for unit groups created by blizzard.
the call DestroyGroup is for groups that you create. which this is the one u should use.

you problem is above the the unit groups then plz update trigger with the call DestroyGroup and post the new trigger.

It's so entertaining to watch you do work when your drinking lol.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
It's so entertaining to watch you do work when your drinking lol.

ys this ?

@ robo-dude u have a couple of location leaks u should take care of.

here is ur problem
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
it ends a couple lines below that because of this
  • (RenzokuED_Balls[RenzokuED_MUI] Less than or equal to 0) and ((RenzokuED_BallGroup[RenzokuED_MUI] is empty) Equal to True)
 
Level 7
Joined
Jan 22, 2013
Messages
293
ys this ?

@ robo-dude u have a couple of location leaks u should take care of.

here is ur problem
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
it ends a couple lines below that because of this
  • (RenzokuED_Balls[RenzokuED_MUI] Less than or equal to 0) and ((RenzokuED_BallGroup[RenzokuED_MUI] is empty) Equal to True)

I'm to tired to work on something this big so I am leaving you with deathismyfriend. I hope you don't mind.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
Which one or just all of them in general?

Where are the location leaks?

Also i've removed
  • (RenzokuED_Balls[RenzokuED_MUI] Less than or equal to 0) and ((RenzokuED_BallGroup[RenzokuED_MUI] is empty) Equal to True)
Nothing has changed still the same errors.
 
Level 7
Joined
Jan 22, 2013
Messages
293
  • Custom script: call DestroyGroup(udg_RenzokuED_BallGroup[udg_RenzokuED_MUI])
Which one or just all of them in general?

Where are the location leaks?

Also i've removed
  • (RenzokuED_Balls[RenzokuED_MUI] Less than or equal to 0) and ((RenzokuED_BallGroup[RenzokuED_MUI] is empty) Equal to True)
Nothing has changed still the same errors.

I'm gonna swing back into this for a brief moment.

You need to stop removing things, it could make more problems then good by doing that for it could ruin a new branch of structure for the triggers that he is trying to solve for you. with that said I'm swinging back out, the way you showed in my eyes is that you removed it instead of wanting to move the custom script.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
I'm gonna swing back into this for a brief moment.

You need to stop removing things, it could make more problems then good by doing that for it could ruin a new branch of structure for the triggers that he is trying to solve for you. with that said I'm swinging back out, the way you showed in my eyes is that you removed it instead of wanting to move the custom script.

If a suggestion doesn't work, i always re-add back in the part i delete. I was just saying that his suggestion towards the condition didn't work.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
first thing i found is that the trigger runs from start to finish.

also you dont know how to index. your indexing is completely wrong and inefficient. i dont mean to sound rude.

check out the indexing portion in my Things a GUI user should know.
link is in my sig down below

I do know how too index, this is just an old way of indexing which I've been using since 2011.

This is the only trigger i've had issue with.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
this indexing is very inefficient tho. u dont remove indexes that arent used anymore.
so no matter what u loop from beginning to end. this type of indexing also has a chance of hitting the array limit which will ruin the whole spell

It does remove the indexes which are not used anymore.

If you cast the spell, at the end of the trigger the current indexes will be left with the following integer.

Index1: 0
Index2: 0
MUI: 1 or 2 (However this will reset when going through the loop)

Here's what i mean in a photo.
344t8q8.png
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
it doesnt get rid of the indexes in an efficient way. by this i mean the spell has to be done with indexes to reset and start at the first index. problem is u loop through variables that are not in use.

Anyways ur problem is that u can't enumerate through units with the ability locust on them the normal way. in other words u keep adding a null unit when enumerating through the kai balls.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
the variables are in use only when first made but when there timer ends they arent removed till all instances of the spell end.

when you try to add units with locust ability to a unit group it doesnt work. basically u add no unit to the group

Ahhh, ok thanks.

Changed it from unit group to a unit variable, "RenzokuED_Dummy1(RenzokuED_MUI)" and "RenzokuED_Dummy2(RenzokuED_MUI)" now two units can cast the ability at the same time.

Now just to fix the issue with the script ending whilst units are still casting.

Edit: Ooops i had index1 and index2 mixed the wrong way round at the end.
 
Status
Not open for further replies.
Top