- Joined
- Mar 1, 2013
- Messages
- 555
loop should be .03 not .04
u never reduce the arcaneleafperiod ?
the if condition will never fire.
I did, somewhere near the end. I've found the problem: when I remove the 'set Temp_Int = Temp_Int - 1' then it works. So basically I have to finish the intire index structure to fix the small random 'bugs'.
Why is 0.03 better than 0.04?
Edit: ok my spell is done. Kind of. I still need to turn it off though. I think it has a very bad leak(s) because my pc lag while a spell is running. Some of the Life Rays doesn't get to their destenation and just stands frozen on the map.
-
Arcane leaf loop
-

Events
-


Time - Every 0.20 seconds of game time
-
-

Conditions
-

Actions
-


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



Loop - Actions
-




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





If - Conditions
-






iArcaneLeafPeriod[Temp_Int] Equal to 0
-






(uArcaneLeafT[Temp_Int] is paused) Equal to False
-
-





Then - Actions
-






Set iArcaneLeafCount[Temp_Int] = (iArcaneLeafCount[Temp_Int] - 1)
-






Set iArcaneLeafPeriod[Temp_Int] = 25
-






Set Temp_Player = (Owner of uArcaneLeafC[Temp_Int])
-






Set Temp_Point = (Position of uArcaneLeafT[Temp_Int])
-






Set Temp_Real = ((Life of uArcaneLeafT[Temp_Int]) x 0.07)
-






Unit - Cause uArcaneLeafC[Temp_Int] to damage uArcaneLeafT[Temp_Int], dealing Temp_Real damage of attack type Spells and damage type Normal
-






Set Temp_Goup = (Units within 500.00 of Temp_Point matching (((Owner of (Matching unit)) is an ally of Temp_Player) Equal to True))
-






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







If - Conditions
-








(Number of units in Temp_Goup) Greater than 0
-
-







Then - Actions
-








Set iLifeRayIndex = (iLifeRayIndex + 1)
-








Unit - Create 1 Life seed for Temp_Player at Temp_Point facing Default building facing degrees
-








Set uLifeRayC[iLifeRayIndex] = (Last created unit)
-








Set uLifeRayT[iLifeRayIndex] = (Random unit from Temp_Goup)
-








Set rLifeRayHeal[iLifeRayIndex] = Temp_Real
-
-







Else - Actions
-
-






Custom script: call DestroyGroup(GetLastCreatedGroup())
-






Custom script: call RemoveLocation(udg_Temp_Point)
-
-





Else - Actions
-






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







If - Conditions
-








(uArcaneNovaC[Temp_Int] is paused) Equal to False
-
-







Then - Actions
-








Set iArcaneLeafPeriod[Temp_Int] = (iArcaneLeafPeriod[Temp_Int] - 1)
-
-







Else - Actions
-
-
-
-




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





If - Conditions
-






(iArcaneLeafCount[Temp_Int] Equal to 0) or ((uArcaneLeafC[Temp_Int] is dead) Equal to True)
-
-





Then - Actions
-






Set uArcaneLeafC[Temp_Int] = uArcaneLeafC[iArcaneLeafindex]
-






Set uArcaneLeafC[iArcaneLeafindex] = No unit
-






Set uArcaneLeafT[Temp_Int] = uArcaneLeafT[iArcaneLeafindex]
-






Set uArcaneLeafT[iArcaneLeafindex] = No unit
-






Set iArcaneLeafCount[Temp_Int] = iArcaneLeafCount[iArcaneLeafindex]
-






Set iArcaneLeafCount[iArcaneLeafindex] = 0
-






Set iArcaneLeafPeriod[Temp_Int] = iArcaneLeafPeriod[iArcaneLeafindex]
-






Set iArcaneLeafPeriod[iArcanePulseIndex] = 0
-






Set Temp_Int = (Temp_Int - 1)
-
-





Else - Actions
-
-
-
-


If (iLifeRayIndex Equal to 0) then do (Skip remaining actions) else do (Do nothing)
-


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



Loop - Actions
-




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





If - Conditions
-






(uLifeRayC[Temp_Int] is paused) Equal to False
-
-





Then - Actions
-






Set Temp_Point = (Position of uLifeRayC[Temp_Int])
-






Set Temp_Point2 = (Position of uLifeRayT[Temp_Int])
-






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







If - Conditions
-








(Distance between Temp_Point and Temp_Point2) Less than 25.00
-
-







Then - Actions
-








Unit - Kill uLifeRayC[Temp_Int]
-








Unit - Set life of uLifeRayT[Temp_Int] to ((Life of uLifeRayT[Temp_Int]) + rLifeRayHeal[Temp_Int])
-








Set uLifeRayC[Temp_Int] = uLifeRayC[iLifeRayIndex]
-








Set uLifeRayC[iLifeRayIndex] = No unit
-








Set uLifeRayT[Temp_Int] = uLifeRayT[iLifeRayIndex]
-








Set uLifeRayT[iLifeRayIndex] = No unit
-








Set rLifeRayHeal[Temp_Int] = rLifeRayHeal[iLifeRayIndex]
-








Set rLifeRayHeal[iLifeRayIndex] = 0.00
-








Set Temp_Int = (Temp_Int - 1)
-
-







Else - Actions
-








Set Temp_Real = (Angle from Temp_Point to Temp_Point2)
-








Custom script: call RemoveLocation(udg_Temp_Point2)
-








Set Temp_Point2 = (Temp_Point offset by 10.00 towards Temp_Real degrees)
-








Unit - Move uLifeRayC[Temp_Int] instantly to Temp_Point
-








Custom script: call RemoveLocation(udg_Temp_Point)
-








Custom script: call RemoveLocation(udg_Temp_Point2)
-
-
-
-





Else - Actions
-
-
-
-
-
Last edited:
