- Joined
- Oct 25, 2009
- Messages
- 995
Does this triggers have leaks?Also,how can i create the MUI lightning effect?
i can't destroy after the multi unit casted.
i can't destroy after the multi unit casted.
-
LC Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Lightning Circle
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LC_Index1 Equal to 0
-
Then - Actions
- Trigger - Turn on LC Loop <gen>
- Else - Actions
-
If - Conditions
- Set LC_Index1 = (LC_Index1 + 1)
- Set LC_Index2 = (LC_Index2 + 1)
- Set LC_Caster[LC_Index2] = (Triggering unit)
- Set LC_TargetPoint[LC_Index2] = (Target point of ability being cast)
- Set LC_StartTimer[LC_Index2] = 200.00
- Set LC_ExpiredTimer[LC_Index2] = 0.00
- Set LC_Boolean[LC_Index2] = True
- Set LC_Damage[LC_Index2] = (1.00 x (Real((Level of Lightning Circle for LC_Caster[LC_Index2]))))
- Unit - Create 1 Lightning_Dummy for (Owner of LC_Caster[LC_Index2]) at LC_TargetPoint[LC_Index2] facing Default building facing degrees
- Set LC_Dummy[LC_Index2] = (Last created unit)
- Unit - Add a 10.00 second Generic expiration timer to LC_Dummy[LC_Index2]
- Set LC_Group[LC_Index2] = (Units within 500.00 of (Position of LC_Dummy[LC_Index2]) matching (((Matching unit) belongs to an enemy of (Owner of LC_Dummy[LC_Index2])) Equal to True))
- Set LC_Point[LC_Index2] = (Position of LC_Dummy[LC_Index2])
-
For each (Integer A) from 1 to 18, do (Actions)
-
Loop - Actions
- Unit - Create 1 Lightning_Dummy for (Owner of LC_Caster[LC_Index2]) at (LC_TargetPoint[LC_Index2] offset by 500.00 towards ((Real((Integer A))) x (360.00 / 18.00)) degrees) facing LC_TargetPoint[LC_Index2]
- Set LC_Dummy2[LC_Index2] = (Last created unit)
- Unit - Add a 10.00 second Generic expiration timer to LC_Dummy2[LC_Index2]
- Set LC_DummyPoint[LC_Index2] = (Position of LC_Dummy[LC_Index2])
- Set LC_UnitPoint[LC_Index2] = (Position of LC_Dummy2[LC_Index2])
- Lightning - Create a Chain Lightning - Primary lightning effect from source LC_DummyPoint[LC_Index2] to target LC_UnitPoint[LC_Index2]
- Set LC_LightningEffect[(Integer A)] = (Last created lightning effect)
- Custom script: call RemoveLocation(udg_LC_UnitPoint[udg_LC_Index2])
- Custom script: call RemoveLocation(udg_LC_DummyPoint[udg_LC_Index2])
-
Loop - Actions
- Custom script: call RemoveLocation(udg_LC_TargetPoint[udg_LC_Index2])
- Custom script: call RemoveLocation(udg_LC_Point[udg_LC_Index2])
- Custom script: call DestroyGroup(udg_LC_Group[udg_LC_Index2])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
LC Loop
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
-
For each (Integer LC_IndexLoop) from 1 to LC_Index2, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LC_StartTimer[LC_IndexLoop] Greater than or equal to LC_ExpiredTimer[LC_IndexLoop]
-
Then - Actions
- Set LC_ExpiredTimer[LC_IndexLoop] = (LC_ExpiredTimer[LC_IndexLoop] + 1.00)
- Set LC_Group[LC_IndexLoop] = (Units within 500.00 of (Position of LC_Dummy[LC_IndexLoop]) matching (((Matching unit) belongs to an enemy of (Owner of LC_Dummy[LC_IndexLoop])) Equal to True))
- Set LC_Point[LC_IndexLoop] = (Position of LC_Dummy[LC_IndexLoop])
-
Destructible - Pick every destructible within 500.00 of (Position of LC_Dummy[LC_IndexLoop]) and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: set bj_wantDestroyGroup=true
-
Unit Group - Pick every unit in LC_Group[LC_IndexLoop] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A structure) Equal to False
- ((Picked unit) is alive) Equal to True
-
Then - Actions
- Set LC_DummyPoint[LC_IndexLoop] = (Position of LC_Dummy[LC_IndexLoop])
- Set LC_UnitPoint[LC_IndexLoop] = (Position of (Picked unit))
- Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 0.25 towards (Facing of (Picked unit)) degrees), facing LC_Point[LC_IndexLoop]
- Unit - Cause LC_Dummy[LC_IndexLoop] to damage (Picked unit), dealing LC_Damage[LC_IndexLoop] damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect at (Position of (Picked unit)) using war3mapImported\Lightnings Long.mdx
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_LC_DummyPoint[udg_LC_IndexLoop])
- Custom script: call RemoveLocation(udg_LC_UnitPoint[udg_LC_IndexLoop])
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_LC_Group[udg_LC_IndexLoop])
- Custom script: call RemoveLocation(udg_LC_Point[udg_LC_IndexLoop])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LC_Boolean[LC_IndexLoop] Equal to True
-
Then - Actions
-
For each (Integer A) from 1 to 18, do (Actions)
-
Loop - Actions
- Lightning - Destroy LC_LightningEffect[(Integer A)]
-
Loop - Actions
- Lightning - Destroy LC_LightningEffect[LC_IndexLoop]
- Set LC_Index1 = (LC_Index1 - 1)
- Set LC_Boolean[LC_IndexLoop] = False
-
For each (Integer A) from 1 to 18, do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LC_Index1 Equal to 0
-
Then - Actions
- Set LC_Index2 = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
For each (Integer LC_IndexLoop) from 1 to LC_Index2, do (Actions)
-
Events