- Joined
- Mar 1, 2013
- Messages
- 555
The title explains pretty much everything. I have this simple loop and don't know how to remove the lightning without a crash:
Please help
-
Untitled Trigger 002
-

Events
-


Time - Every 0.05 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer Temp_Int) from 1 to 24, do (Actions)
-



Loop - Actions
-




Set pStaticT[Temp_Int] = (Position of uStaticT[Temp_Int])
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Distance between pStaticDestenation[Temp_Int] and pStaticT[Temp_Int]) Less than 100.00
-
-





Then - Actions
-






Lightning - Destroy StaticLightning[Temp_Int]
-






Set uStaticC[Temp_Int] = No unit
-






Set uStaticT[Temp_Int] = No unit
-






Set rStaticDamage[Temp_Int] = 0.00
-
-





Else - Actions
-






Set rStaticDamage[Temp_Int] = (rStaticDamage[Temp_Int] x 1.03)
-






Set StaticAngle = (Angle from pStaticT[Temp_Int] to pStaticDestenation[Temp_Int])
-






Set pStaticT[Temp_Int] = (pStaticT[Temp_Int] offset by rStaticDamage[Temp_Int] towards StaticAngle degrees)
-






Unit - Move uStaticT[Temp_Int] instantly to pStaticT[Temp_Int]
-






Unit - Cause uStaticC[Temp_Int] to damage uStaticT[Temp_Int], dealing (rStaticDamage[Temp_Int] / 3.00) damage of attack type Spells and damage type Normal
-






Lightning - Move StaticLightning[Temp_Int] to source pStaticT[Temp_Int] and target pStaticDestenation[Temp_Int]
-
-
-
-
-
-





