This trigger:
gives me the error: nested iteration detected.
What does this error mean and how do I fix this?
-
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)
-
Actions
-
Conditions
-
Actions
-
Conditions
-
General - If (Conditions) then do (Actions) else do (Actions)
-
If
-
And
-
Conditions
- (Projectile is alive) == True
-
Conditions
-
And
-
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
-
Actions
-
Conditions
-
Actions
- Else
-
If
-
Events
What does this error mean and how do I fix this?