- Joined
- Mar 5, 2011
- Messages
- 199
-
ThS Loop
- Events
- Conditions
-
Actions
- -------- --------------------------------------------------- --------
- -------- ----------INDEXING START---------- --------
- -------- --------------------------------------------------- --------
-
For each (Integer ThS_Loop) from 0 to (ThS_Index_Listener - 1), do (Actions)
-
Loop - Actions
- Set ThS_Current_Index = ThS_Index_Container[ThS_Loop]
- -------- --------------------------------------------------- --------
- -------- ----------INDEXING END---------- --------
- -------- --------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ThS_Timer_1[ThS_Current_Index] Greater than 0.00
- (ThS_Caster[ThS_Current_Index] is alive) Equal to ThS_Condition_Config[0]
-
Then - Actions
- Set ThS_Timer_1[ThS_Current_Index] = (ThS_Timer_1[ThS_Current_Index] - ThS_Interval)
- Set ThS_Caster_Point = (Position of ThS_Caster[ThS_Current_Index])
- Set ThS_Angle[ThS_Current_Index] = ((Angle from ThS_TargetPoint[ThS_Current_Index] to ThS_Caster_Point) + ThS_Spin_Speed[ThS_Level[ThS_Current_Index]])
- Custom script: call SetUnitX(udg_ThS_Caster[udg_ThS_Current_Index],GetUnitX(udg_ThS_Dummy[udg_ThS_Current_Index]) + udg_ThS_Stay_Distance[udg_ThS_Level[udg_ThS_Current_Index]] * Cos(udg_ThS_Angle[udg_ThS_Current_Index] * bj_DEGTORAD))
- Custom script: call SetUnitY(udg_ThS_Caster[udg_ThS_Current_Index],GetUnitY(udg_ThS_Dummy[udg_ThS_Current_Index]) + udg_ThS_Stay_Distance[udg_ThS_Level[udg_ThS_Current_Index]] * Sin(udg_ThS_Angle[udg_ThS_Current_Index] * bj_DEGTORAD))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ThS_Timer_2[ThS_Current_Index] Greater than 0.00
-
Then - Actions
- Set ThS_Timer_2[ThS_Current_Index] = (ThS_Timer_2[ThS_Current_Index] - ThS_Interval)
-
Else - Actions
- Set ThS_Group_1[ThS_Current_Index] = (Units within ThS_Stay_Distance[ThS_Level[ThS_Current_Index]] of ThS_TargetPoint[ThS_Current_Index])
-
Unit Group - Pick every unit in ThS_Group_1[EmS_Current_Index] and do (Actions)
-
Loop - Actions
- Set ThS_Picked_Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (ThS_Picked_Unit is alive) Equal to ThS_Condition_Config[1]
- (ThS_Picked_Unit belongs to an enemy of ThS_Owner[ThS_Current_Index]) Equal to ThS_Condition_Config[2]
- (ThS_Picked_Unit is A structure) Equal to ThS_Condition_Config[3]
- (ThS_Picked_Unit is Magic Immune) Equal to ThS_Condition_Config[4]
-
Then - Actions
- Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_ThS_Effect_Model[2], udg_ThS_Picked_Unit,udg_ThS_Attachment[2]))
- Unit - Cause ThS_Caster[ThS_Current_Index] to damage ThS_Picked_Unit, dealing ThS_Damage_Of_Lightning[ThS_Level[ThS_Current_Index]] damage of attack type ThS_Attack_Type and damage type Normal
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call DestroyGroup(udg_ThS_Group_1[udg_ThS_Current_Index])
- Set ThS_Timer_2[ThS_Current_Index] = ThS_Interval_For_Lightning[ThS_Level[ThS_Current_Index]]
-
If - Conditions
- Set ThS_Group_2[ThS_Current_Index] = (Units within ThS_Pick_Range[ThS_Level[ThS_Current_Index]] of ThS_Caster_Point)
-
Unit Group - Pick every unit in ThS_Group_2[ThS_Current_Index] and do (Actions)
-
Loop - Actions
- Set ThS_Picked_Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (ThS_Picked_Unit is alive) Equal to ThS_Condition_Config[1]
- (ThS_Picked_Unit belongs to an enemy of ThS_Owner[ThS_Current_Index]) Equal to ThS_Condition_Config[2]
- (ThS_Picked_Unit is A structure) Equal to ThS_Condition_Config[3]
- (ThS_Picked_Unit is Magic Immune) Equal to ThS_Condition_Config[4]
-
Then - Actions
- Set ThS_Picked_Point = (Position of ThS_Picked_Unit)
- Set ThS_Angle[ThS_Current_Index] = (Angle from ThS_Picked_Point to ThS_TargetPoint[ThS_Current_Index])
- Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_ThS_Effect_Model[3], udg_ThS_Picked_Unit,udg_ThS_Attachment[3]))
- Unit - Cause ThS_Caster[ThS_Current_Index] to damage ThS_Picked_Unit, dealing ThS_Rushing_Over_Damage[ThS_Level[ThS_Current_Index]] damage of attack type ThS_Attack_Type and damage type Normal
- Custom script: call SetUnitX(udg_ThS_Picked_Unit,GetUnitX(udg_ThS_Picked_Unit) + udg_ThS_Recoil_Speed[udg_ThS_Level[udg_ThS_Current_Index]] * Cos(udg_ThS_Angle[udg_ThS_Current_Index] * bj_DEGTORAD))
- Custom script: call SetUnitY(udg_ThS_Picked_Unit,GetUnitY(udg_ThS_Picked_Unit) + udg_ThS_Recoil_Speed[udg_ThS_Level[udg_ThS_Current_Index]] * Sin(udg_ThS_Angle[udg_ThS_Current_Index] * bj_DEGTORAD))
- Custom script: call RemoveLocation(udg_ThS_Picked_Point)
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call DestroyGroup(udg_ThS_Group_2[udg_ThS_Current_Index])
- Custom script: call RemoveLocation(udg_ThS_Caster_Point)
-
Else - Actions
- Unit - Move ThS_Caster[ThS_Current_Index] instantly to ThS_Start_Point[ThS_Current_Index], facing (Random angle) degrees
- Animation - Change ThS_Caster[ThS_Current_Index]'s animation speed to 100.00% of its original speed
- Unit - Turn collision for ThS_Caster[ThS_Current_Index] On
- Unit - Remove ThS_Dummy[ThS_Current_Index] from the game
- Custom script: call RemoveLocation(udg_ThS_Start_Point[udg_ThS_Current_Index])
- Custom script: call RemoveLocation(udg_ThS_TargetPoint[udg_ThS_Current_Index])
- Custom script: call DestroyEffect(udg_ThS_SE_1[udg_ThS_Current_Index])
- -------- --------------------------------------------------- --------
- -------- ----------INDEXING START---------- --------
- -------- --------------------------------------------------- --------
- Set ThS_Index_Listener = (ThS_Index_Listener - 1)
- Set ThS_Index_Container[ThS_Loop] = ThS_Index_Container[ThS_Index_Listener]
- Set ThS_Recycle_Container[ThS_Recycle_Size] = ThS_Current_Index
- Set ThS_Recycle_Size = (ThS_Recycle_Size + 1)
- Set ThS_Loop = (ThS_Loop - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ThS_Index_Listener Equal to 0
-
Then - Actions
- Trigger - Turn off ThS Loop <gen>
- Else - Actions
-
If - Conditions
- -------- --------------------------------------------------- --------
- -------- ----------INDEXING END---------- --------
- -------- --------------------------------------------------- --------
-
If - Conditions
-
Loop - Actions
This line
call DestroyEffect(udg_ThS_SE_1[udg_ThS_Current_Index])
what seems to be the problem?