- Joined
- Aug 8, 2010
- Messages
- 1,022
Yo! I have a spell here with Hanky's Dynamic Indexing system. And i have trouble with lightnings - they are not MUI. The problem is this : i have 1 instance of the spell and then another instance is casted. The problem is that the second instance finishes first, while the first instance never ends. The spell even makes the game crash upon multiple casts in short amount of time. Help me, please. I will post the triggers below, as well as uploading the map.
Help will be appreciated with a +rep. Thanks in advance!
-
Chain Shock Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Electric Field silence
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EleFID2 Equal to 0
-
Then - Actions
- Trigger - Turn on Chain Shock Loop <gen>
- Else - Actions
-
If - Conditions
- Set EleFID2 = (EleFID2 + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EleFID2 Greater than EleFIDMax
-
Then - Actions
- Set EleFID[EleFID2] = EleFID2
- Set EleFIDMax = EleFID2
- Else - Actions
-
If - Conditions
- Set EleFArray = EleFID[EleFID2]
- Set EleFCaster[EleFArray] = (Triggering unit)
- Set EleFAbilityLevel[EleFArray] = (Level of Electric Field silence for (Triggering unit))
- Set EleFPoint[EleFArray] = (Target point of ability being cast)
- Set EleFAreaOfEffect[EleFArray] = (200.00 + (50.00 x (Real(EleFAbilityLevel[EleFArray]))))
- Set EleFIntegerAMax[EleFArray] = (((Integer(EleFAreaOfEffect[EleFArray])) / 50) x 2)
- Set EleFLightAlpha[EleFArray] = 0.00
- Set EleFBoolean[EleFArray] = False
- Set EleFDuration[EleFArray] = 3.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Chain Shock Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer EleFLoop) from 1 to EleFID2, do (Actions)
-
Loop - Actions
- Set EleFArray = EleFID[EleFLoop]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EleFBoolean[EleFArray] Equal to False
-
Then - Actions
-
For each (Integer EleFIntegerA[EleFArray]) from 1 to EleFIntegerAMax[EleFArray], do (Actions)
-
Loop - Actions
- Set EleFLightSource[EleFIntegerAMax[EleFArray]] = (EleFPoint[EleFArray] offset by EleFAreaOfEffect[EleFArray] towards ((360.00 / (Real(EleFIntegerAMax[EleFArray]))) x (Real(EleFIntegerA[EleFArray]))) degrees)
- Set EleFLightTarget[EleFIntegerAMax[EleFArray]] = (EleFPoint[EleFArray] offset by EleFAreaOfEffect[EleFArray] towards ((360.00 / (Real(EleFIntegerAMax[EleFArray]))) x ((Real(EleFIntegerA[EleFArray])) + 1.00)) degrees)
- Lightning - Create a Chain Lightning - Secondary lightning effect from source EleFLightSource[EleFIntegerAMax[EleFArray]] to target EleFLightTarget[EleFIntegerAMax[EleFArray]]
- Set EleFLightnings[EleFIntegerA[EleFArray]] = (Last created lightning effect)
- Custom script: call RemoveLocation(udg_EleFLightSource[udg_EleFIntegerAMax[udg_EleFArray]])
- Custom script: call RemoveLocation(udg_EleFLightTarget[udg_EleFIntegerAMax[udg_EleFArray]])
-
Loop - Actions
- Set EleFBoolean[EleFArray] = True
-
For each (Integer EleFIntegerA[EleFArray]) from 1 to EleFIntegerAMax[EleFArray], do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EleFLightAlpha[EleFArray] Less than 1.00
-
Then - Actions
-
For each (Integer EleFIntegerA[EleFArray]) from 1 to EleFIntegerAMax[EleFArray], do (Actions)
-
Loop - Actions
- Lightning - Change color of EleFLightnings[EleFIntegerA[EleFArray]] to (1.00 1.00 1.00) with EleFLightAlpha[EleFArray] alpha
-
Loop - Actions
-
For each (Integer EleFIntegerA[EleFArray]) from 1 to EleFIntegerAMax[EleFArray], do (Actions)
- Else - Actions
-
If - Conditions
- Set EleFDuration[EleFArray] = (EleFDuration[EleFArray] - 0.03)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EleFLightAlpha[EleFArray] Less than 1.00
-
Then - Actions
- Set EleFLightAlpha[EleFArray] = (EleFLightAlpha[EleFArray] + 0.05)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EleFDuration[EleFArray] Less than or equal to 0.00
-
Then - Actions
-
For each (Integer EleFIntegerA[EleFArray]) from 1 to EleFIntegerAMax[EleFArray], do (Actions)
-
Loop - Actions
- Lightning - Destroy EleFLightnings[EleFIntegerA[EleFArray]]
-
Loop - Actions
- Set EleFID[EleFLoop] = EleFID[EleFID2]
- Set EleFID[EleFID2] = EleFArray
- Set EleFID2 = (EleFID2 - 1)
- Set EleFLoop = (EleFLoop - 1)
-
For each (Integer EleFIntegerA[EleFArray]) from 1 to EleFIntegerAMax[EleFArray], do (Actions)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer EleFLoop) from 1 to EleFID2, do (Actions)
-
Events