• 🏆 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 error: nested iteration detected

Status
Not open for further replies.
Level 6
Joined
Apr 15, 2012
Messages
205
This trigger:
  • Explosive Shot
    • Events
      • Unit - Any Unit uses Sniper - Sniper - Explosive Shot at Generic6 - Complete stage (Ignore shared abilities)
    • Local Variables
      • Projectile = No Unit <Unit>
      • Counter = 0 <Integer>
      • Explosion Counter = 0 <Integer>
      • Units Hit = (Empty unit group) <Unit Group>
      • Position of Projectile = No Point <Point>
      • Angle = 0 <Integer>
    • Conditions
    • Actions
      • Unit - Create 1 Observer Explosion for player 15 at (Position of (Triggering unit)) facing (Triggering ability target point) (No Options)
      • Variable - Set Projectile = (Last created unit)
      • Unit - Change (Last created unit) height to 1.0 over 0.0 seconds
      • Unit - Make (Last created unit) Invulnerable
      • Unit - Order (Last created unit) to ( Move targeting ((Position of (Triggering unit)) offset by 20.0 towards (Triggering ability target point))) (Replace Existing Orders)
      • General - While (Conditions) are true, do (Actions)
        • Conditions
          • Counter < 20
        • Actions
          • Variable - Set Counter = (Counter + 1)
          • General - Wait 0.025 Game Time seconds
          • Unit Group - Pick each unit in (Any units within 1.0 of (Position of Projectile) where player Any Player matches filter Required: Light; Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
            • Actions
              • Variable - Set Counter = 19
              • Unit - Set (Picked unit) Life to (((Picked unit) Life (Current)) - 25.0)
              • Actor - Create actor model Siege Tank Sieged Attack Impact at point (Position of Projectile)
              • Variable - Set Position of Projectile = (Position of Projectile)
              • Unit - Remove Projectile from the game
              • Unit Group - Add (Picked unit) to Units Hit
              • Unit - Set (Picked unit) custom value 1 to (Angle from (Position of (Picked unit)) to Position of Projectile)
              • General - While (Conditions) are true, do (Actions)
                • Conditions
                  • Explosion Counter < 10
                • Actions
                  • Variable - Set Explosion Counter = (Explosion Counter + 1)
                  • General - Wait 0.01 Game Time seconds
                  • Unit Group - Pick each unit in Units Hit and do (Actions)
                    • Actions
                      • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (0.5 / Explosion Counter) towards ((Angle from (Position of (Picked unit)) to Position of Projectile) + 180.0) degrees) (Blend)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • And
            • Conditions
              • (Projectile is alive) == True
        • Then
          • Variable - Set Position of Projectile = (Position of Projectile)
          • Actor - Create actor model Siege Tank Sieged Attack Impact at point (Position of Projectile)
          • Unit - Remove Projectile from the game
          • Unit Group - Pick each unit in (Any units within 3.0 of Position of Projectile where player Any Player matches filter Required: Light; Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
            • Actions
              • Unit - Set (Picked unit) Life to (((Picked unit) Life (Current)) - 35.0)
              • Unit Group - Add (Picked unit) to Units Hit
              • Unit - Set (Picked unit) custom value 1 to (Angle from (Position of (Picked unit)) to Position of Projectile)
              • General - While (Conditions) are true, do (Actions)
                • Conditions
                  • Explosion Counter < 10
                • Actions
                  • Variable - Set Explosion Counter = (Explosion Counter + 1)
                  • General - Wait 0.01 Game Time seconds
                  • Unit Group - Pick each unit in Units Hit and do (Actions)
                    • Actions
                      • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (0.75 / Explosion Counter) towards ((Angle from (Position of (Picked unit)) to Position of Projectile) + 180.0) degrees) (Blend)
                      • Unit - Remove Projectile from the game
        • Else
gives me the error: nested iteration detected.

What does this error mean and how do I fix this?
 
Level 6
Joined
Apr 15, 2012
Messages
205
Thanks, it worked. The new trigger looks like this:
  • Explosive Shot 2
    • Events
      • Unit - Any Unit uses Sniper - Sniper - Explosive Shot at Generic6 - Complete stage (Ignore shared abilities)
    • Local Variables
      • Projectile = No Unit <Unit>
      • Counter = 0 <Integer>
      • Explosion Counter = 0 <Integer>
      • Units Hit = (Empty unit group) <Unit Group>
      • Position of Projectile = No Point <Point>
      • Angle = 0 <Integer>
      • Explosion 1 = False <Boolean>
    • Conditions
    • Actions
      • Unit - Create 1 Observer Explosion for player 15 at (Position of (Triggering unit)) facing (Triggering ability target point) (No Options)
      • Variable - Set Projectile = (Last created unit)
      • Unit - Change (Last created unit) height to 1.0 over 0.0 seconds
      • Unit - Make (Last created unit) Invulnerable
      • Unit - Order (Last created unit) to ( Move targeting ((Position of (Triggering unit)) offset by 20.0 towards (Triggering ability target point))) (Replace Existing Orders)
      • General - While (Conditions) are true, do (Actions)
        • Conditions
          • Counter < 20
        • Actions
          • Variable - Set Counter = (Counter + 1)
          • General - Wait 0.025 Game Time seconds
          • Unit Group - Pick each unit in (Any units within 1.0 of (Position of Projectile) where player Any Player matches filter Required: Light; Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
            • Actions
              • Variable - Set Explosion 1 = True
              • Variable - Set Counter = 19
              • Unit - Set (Picked unit) Life to (((Picked unit) Life (Current)) - 25.0)
              • Actor - Create actor model Siege Tank Sieged Attack Impact at point (Position of Projectile)
              • Variable - Set Position of Projectile = (Position of Projectile)
              • Unit - Remove Projectile from the game
              • Unit Group - Add (Picked unit) to Units Hit
              • Unit - Set (Picked unit) custom value 1 to (Angle from (Position of (Picked unit)) to Position of Projectile)
      • General - While (Conditions) are true, do (Actions)
        • Conditions
          • And
            • Conditions
              • Explosion Counter < 10
              • Explosion 1 == True
        • Actions
          • Variable - Set Explosion Counter = (Explosion Counter + 1)
          • General - Wait 0.01 Game Time seconds
          • Unit Group - Pick each unit in Units Hit and do (Actions)
            • Actions
              • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (0.5 / Explosion Counter) towards ((Angle from (Position of (Picked unit)) to Position of Projectile) + 180.0) degrees) (Blend)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • And
            • Conditions
              • (Projectile is alive) == True
        • Then
          • Variable - Set Position of Projectile = (Position of Projectile)
          • Actor - Create actor model Siege Tank Sieged Attack Impact at point (Position of Projectile)
          • Unit - Remove Projectile from the game
          • Unit Group - Pick each unit in (Any units within 3.0 of Position of Projectile where player Any Player matches filter Required: Light; Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
            • Actions
              • Unit - Set (Picked unit) Life to (((Picked unit) Life (Current)) - 35.0)
              • Unit Group - Add (Picked unit) to Units Hit
              • Unit - Set (Picked unit) custom value 1 to (Angle from (Position of (Picked unit)) to Position of Projectile)
        • Else
      • General - While (Conditions) are true, do (Actions)
        • Conditions
          • And
            • Conditions
              • Explosion 1 == False
              • Explosion Counter < 10
        • Actions
          • Variable - Set Explosion Counter = (Explosion Counter + 1)
          • General - Wait 0.01 Game Time seconds
          • Unit Group - Pick each unit in Units Hit and do (Actions)
            • Actions
              • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (0.75 / Explosion Counter) towards ((Angle from (Position of (Picked unit)) to Position of Projectile) + 180.0) degrees) (Blend)
              • Unit - Remove Projectile from the game
 
Status
Not open for further replies.
Top