• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Random value seems to break the trigger

Level 4
Joined
May 12, 2022
Messages
24
Hello, I've made this trigger in GUI and I want to understand why adding "Random integer number between 1 and 2) Equal to 1" seems to break the trigger after the 3rd proc each time. It should logically work so I'm guessing this is some limit I'm not aware of that Warcraft has.

The trigger is supposed to cast an initial dummy Storm Bolt and have a 50% chance of casting a consecutive Storm Bolt of the same level after the enemy unit takes DMG. Each Storm Bolt cast is suppose to proc the trigger again and have a 50% chance for casting one more time.
Random values for DMG and Stun duration and are set at the beginning of the trigger for the initial cast and new random values should be set in between the initial cast and the passive that enables the 50% chance of recast. (This is done only so that the first time the passive triggers it doesn't get the same random values.)

I use Game - Display to (All players) to show the DMG dealt in game.

It seems that If I disable "Random integer number between 1 and 2) Equal to 1" for the chance of casting again it works as intended.

Again, the problem is that the passive seems to deal the same random value as DMG twice.

Maybe it's something obvious I'm missing ..


I upload the map so everyone can see for themselves.

Any insight is appreciated!

Thank you!


  • Storm Bolt lvl 1
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Damage taken) Equal to 1.00
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Damage source)) Equal to Kunkka
          • (Unit-type of (Damage source)) Equal to Dummy Chaos Bolt 1
    • Actions
      • -------- INITIAL RANDOM VALUES --------
      • Set VariableSet RandomStun1 = (Random integer number between 1 and 2)
      • Set VariableSet RandomStun2 = (Random integer number between 1 and 3)
      • Set VariableSet RandomStun3 = (Random integer number between 1 and 4)
      • Set VariableSet RandomStun4 = (Random integer number between 2 and 4)
      • Set VariableSet RandomStun5 = (Random integer number between 2 and 5)
      • Set VariableSet RandomDMG1 = (Random integer number between 1 and 200)
      • Set VariableSet RandomDMG2 = (Random integer number between 100 and 400)
      • Set VariableSet RandomDMG3 = (Random integer number between 200 and 600)
      • Set VariableSet RandomDMG4 = (Random integer number between 300 and 800)
      • Set VariableSet RandomDMG5 = (Random integer number between 400 and 1000)
      • -------- --------------------------------------------------- --------
      • -------- INITIAL CAST --------
      • -------- --------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Damage source)) Equal to Kunkka
        • Then - Actions
          • Unit - Create 1 Dummy Chaos Bolt 3 for (Owner of (Damage source)) at (Position of (Damage Target)) facing (Position of (Damage Target))
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • -------- STUN DURATION BASED ON RANDOM VALUE --------
          • -------- Level 1 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 1
              • RandomStun1 Equal to 1
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG1))
              • Unit - Add Storm Bolt Stun 1 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to 1
              • Unit - Set the custom value of (Last created unit) to 1
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 1
              • RandomStun1 Equal to 2
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG1))
              • Unit - Add Storm Bolt Stun 1 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to 2
              • Unit - Set the custom value of (Last created unit) to 1
            • Else - Actions
          • -------- Level 2 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 2
              • RandomStun2 Equal to 1
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG2))
              • Unit - Add Storm Bolt Stun 1 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 2 for (Last created unit) to RandomStun2
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 2
              • RandomStun2 Equal to 2
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG2))
              • Unit - Add Storm Bolt Stun 2 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 2 for (Last created unit) to RandomStun2
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 2
              • RandomStun2 Equal to 3
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG2))
              • Unit - Add Storm Bolt Stun 3 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 2 for (Last created unit) to RandomStun2
            • Else - Actions
          • -------- Level 3 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 3
              • RandomStun3 Equal to 1
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG3))
              • Unit - Add Storm Bolt Stun 1 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 3 for (Last created unit) to RandomStun3
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 3
              • RandomStun3 Equal to 2
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG3))
              • Unit - Add Storm Bolt Stun 2 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 3 for (Last created unit) to RandomStun3
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 3
              • RandomStun3 Equal to 3
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG3))
              • Unit - Add Storm Bolt Stun 3 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 3 for (Last created unit) to RandomStun3
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 3
              • RandomStun3 Equal to 4
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG3))
              • Unit - Add Storm Bolt Stun 4 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 3 for (Last created unit) to RandomStun3
            • Else - Actions
          • -------- Level 4 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 4
              • RandomStun4 Equal to 2
            • Then - Actions
              • Unit - Add Storm Bolt Stun 2 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 4 for (Last created unit) to RandomStun4
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 4
              • RandomStun4 Equal to 3
            • Then - Actions
              • Unit - Add Storm Bolt Stun 3 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 4 for (Last created unit) to RandomStun4
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 4
              • RandomStun4 Equal to 4
            • Then - Actions
              • Unit - Add Storm Bolt Stun 4 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 4 for (Last created unit) to RandomStun4
            • Else - Actions
          • -------- Level 5 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 5
              • RandomStun5 Equal to 2
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG5))
              • Unit - Add Storm Bolt Stun 2 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 5 for (Last created unit) to RandomStun5
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 5
              • RandomStun5 Equal to 3
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG5))
              • Unit - Add Storm Bolt Stun 3 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 5 for (Last created unit) to RandomStun5
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 5
              • RandomStun5 Equal to 4
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG5))
              • Unit - Add Storm Bolt Stun 4 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 5 for (Last created unit) to RandomStun5
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Storm Bolt Dummy for (Damage source)) Equal to 5
              • RandomStun5 Equal to 5
            • Then - Actions
              • Set VariableSet chaosDamageReal = (Real(RandomDMG5))
              • Unit - Add Storm Bolt Stun 5 to (Last created unit)
              • Unit - Set level of Storm Bolt Stun 5 for (Last created unit) to RandomStun5
            • Else - Actions
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Unit - Cause (Last created unit) to damage (Damage Target), dealing chaosDamageReal damage of attack type Spells and damage type Magic
          • Game - Display to (All players) the text: ((String(chaosDamageReal)) + |cffffff00INITIAL DMG|r)
        • Else - Actions
      • -------- --------------------------------------------------- --------
      • -------- RESET RANDOM VALUES FOR PASSIVE --------
      • -------- --------------------------------------------------- --------
      • Set VariableSet RandomStun1 = (Random integer number between 1 and 2)
      • Set VariableSet RandomStun2 = (Random integer number between 1 and 3)
      • Set VariableSet RandomStun3 = (Random integer number between 1 and 4)
      • Set VariableSet RandomStun4 = (Random integer number between 2 and 4)
      • Set VariableSet RandomStun5 = (Random integer number between 2 and 5)
      • Set VariableSet RandomDMG1 = (Random integer number between 1 and 200)
      • Set VariableSet RandomDMG2 = (Random integer number between 100 and 400)
      • Set VariableSet RandomDMG3 = (Random integer number between 200 and 600)
      • Set VariableSet RandomDMG4 = (Random integer number between 300 and 800)
      • Set VariableSet RandomDMG5 = (Random integer number between 400 and 1000)
      • -------- --------------------------------------------------- --------
      • -------- Passive LEVEL 1 --------
      • -------- --------------------------------------------------- --------
      • -------- Level 1 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 1
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 1
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: |cff00ffffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG1))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at Temp_Point facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun1
          • Unit - Add Brilliance Aura (Neutral Hostile) to (Last created unit)
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: (((String(RandomStun1)) + Second Stun) + Passive Level 1 - Ability Level 1)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- Level 2 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 2
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 1
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: |cff00ffffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG2))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at Temp_Point facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Add Brilliance Aura (Neutral Hostile) to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun2
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun2)) + |cff0000ffStun 2|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- Level 3 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 3
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 1
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: |cff00ffffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG3))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at ((Position of (Damage source)) offset by (10.00, 0.00)) facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun3
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun3)) + |cff0000ffStun 3|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- Level 4 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 4
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 1
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: |cff00ffffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG4))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at ((Position of (Damage source)) offset by (10.00, 0.00)) facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun4
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun4)) + |cff0000ffStun 4|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- Level 5 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 5
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 1
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: |cff00ffffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG5))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at ((Position of (Damage source)) offset by (10.00, 0.00)) facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun5
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun5)) + |cff0000ffStun 5|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- --------------------------------------------------- --------
      • -------- Passive LEVEL 2 --------
      • -------- --------------------------------------------------- --------
      • -------- Level 1 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 1
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 2
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: |cff8080ffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG1))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at Temp_Point facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Brilliance Aura (Neutral Hostile) to (Last created unit)
          • Unit - Set level of Brilliance Aura (Neutral Hostile) for (Last created unit) to 2
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun1
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun1)) + |cff0000ffStun 1|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- Level 2 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 2
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 2
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: |cff8080ffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG2))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at Temp_Point facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun2
          • Unit - Add Brilliance Aura (Neutral Hostile) to (Last created unit)
          • Unit - Set level of Brilliance Aura (Neutral Hostile) for (Last created unit) to 2
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun2)) + |cff0000ffStun 2|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- Level 3 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 3
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 2
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: |cff8080ffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG3))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at ((Position of (Damage source)) offset by (10.00, 0.00)) facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun3
          • Unit - Add Brilliance Aura (Neutral Hostile) to (Last created unit)
          • Unit - Set level of Brilliance Aura (Neutral Hostile) for (Last created unit) to 2
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun3)) + |cff0000ffStun 3|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- Level 4 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 4
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 2
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: |cff8080ffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG4))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at ((Position of (Damage source)) offset by (10.00, 0.00)) facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun4
          • Unit - Add Brilliance Aura (Neutral Hostile) to (Last created unit)
          • Unit - Set level of Brilliance Aura (Neutral Hostile) for (Last created unit) to 2
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun4)) + |cff0000ffStun 4|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- Level 5 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
          • (Custom value of chaosCaster) Equal to 5
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Brilliance Aura for (Damage source)) Equal to 2
              • (Level of Brilliance Aura (Neutral Hostile) for (Damage source)) Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: |cff8080ffPassive L...
          • Set VariableSet chaosDamageReal = (Real(RandomDMG5))
          • Set VariableSet Temp_Point = (Position of (Damage source))
          • Unit - Create 1 Dummy Chaos Bolt 1 for (Owner of (Damage source)) at ((Position of (Damage source)) offset by (10.00, 0.00)) facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Storm Bolt Stun 1 to (Last created unit)
          • Unit - Set level of Storm Bolt Stun 1 for (Last created unit) to RandomStun5
          • Unit - Add Brilliance Aura (Neutral Hostile) to (Last created unit)
          • Unit - Set level of Brilliance Aura (Neutral Hostile) for (Last created unit) to 2
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage Target)
          • Game - Display to (All players) the text: ((String(RandomStun5)) + |cff0000ffStun 5|r)
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
      • -------- --------------------------------------------------- --------
      • -------- DMG DEALT FROM PASSIVE --------
      • -------- --------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Damage source)) Equal to Dummy Chaos Bolt 1
        • Then - Actions
          • Unit - Create 1 Dummy Chaos Bolt 2 for (Owner of (Damage source)) at (Position of (Damage Target)) facing Temp_Point
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Cause (Last created unit) to damage (Damage Target), dealing chaosDamageReal damage of attack type Spells and damage type Magic
          • Game - Display to (All players) the text: ((String(chaosDamageReal)) + |cff00ff00DMG From Passive|r)
        • Else - Actions
 

Attachments

Here's a revised version of your map which: removes repetition from your triggers, fixes your Dummy unit's incorrect settings, and addresses other issues.

Note that if you find yourself repeating the same Action or if your trigger is massive and difficult to manage then you're probably doing things the hard way. By utilizing some of the more advanced techniques you can accomplish the same goal while achieving better performance and less bloat.

In this case I used Array variables and the "Set Ability Field" actions to simply things. I didn't account for your Brilliance Aura stuff because I wasn't sure what it was meant to do, but I imagine it'll be very easy to add it onto this cleaner design. Also, having a potentially infinite number of multicasts seems like a poor idea. That's why I added a "Max Multicasts" variable in my version, by setting it to something like 500 you would effectively make it unlimited while technically preventing an endless barrage.

1. Don't mess with Custom Value yourself. Instead, use a Unit Indexer and have it assign these values for you. It accomplishes the same thing but better.
2. Use Array variables to store your "field" data and other constant values. For example, Arrays are great for storing a different value for each ability level.
3. Use Array variables + the Unit Indexer to "attach" data to units. I use this to link the Dummy to Kunkka so that they can share variables.

Note that this design could likely be improved by ditching the Damage Event and relying on "A unit Starts the effect of an ability" while queuing a bunch of Dummy's ahead of time. That would make it far more reliable and less hacky.

Also, a Missile system would be even better since you could make all of the damage come from Kunkka rather than the Dummy units. This is important for getting proper damage/kill credit, ie: Upon killing a unit, Kunkka restores 20 hp.
 

Attachments

Last edited:
Back
Top