- Joined
- Sep 9, 2012
- Messages
- 172
I haven't been able to fix this into MUI
I think the code is OK,,But not Complete MUI yet
I think I mis-used some actions
Please check it for me.This spell will be included in B-UP's Spell Pack v1.2
I think the code is OK,,But not Complete MUI yet
I think I mis-used some actions
Please check it for me.This spell will be included in B-UP's Spell Pack v1.2
-
TdC Config
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- Is the caster alive?? --------
-


Set TdC_Condition_Config[0] = True
-


-------- Is the picked unit alive?? --------
-


Set TdC_Condition_Config[1] = True
-


-------- Is the picked unit belongs to the enemy of the caster?? --------
-


Set TdC_Condition_Config[2] = True
-


-------- Is the picked unit a structure?? --------
-


Set TdC_Condition_Config[3] = False
-


-------- Is the picked unit magic immune?? --------
-


Set TdC_Condition_Config[4] = False
-


Set TdC_Angle_Add_Quantity[1] = 90.00
-


Set TdC_Angle_Add_Quantity[2] = -90.00
-


Set TdC_Animation_Type = attack
-


Set TdC_Push_Speed[1] = 20.00
-


Set TdC_Push_Speed[2] = 20.00
-


Set TdC_Push_Speed[3] = 20.00
-


Set TdC_Push_Speed[4] = 20.00
-


Set TdC_Rush_Speed[1] = 28.00
-


Set TdC_Rush_Speed[2] = 28.00
-


Set TdC_Rush_Speed[3] = 28.00
-


Set TdC_Rush_Speed[4] = 28.00
-


Set TdC_Push_Duration[1] = 3.00
-


Set TdC_Push_Duration[2] = 3.00
-


Set TdC_Push_Duration[3] = 3.00
-


Set TdC_Push_Duration[4] = 3.00
-


Set TdC_Push_Damage[1] = 12.00
-


Set TdC_Push_Damage[2] = 12.00
-


Set TdC_Push_Damage[3] = 12.00
-


Set TdC_Push_Damage[4] = 12.00
-


Set TdC_Damage_Type[1] = Spells
-


Set TdC_Damage_Type[2] = Spells
-


Set TdC_Damage_Type[3] = Spells
-


Set TdC_Damage_Type[4] = Spells
-


Set TdC_SE_Stay_Distance = 100.00
-


Set TdC_Picked_Stay_Distance = 30.00
-


Set TdC_Rush_Pick_Range[1] = 200.00
-


Set TdC_Rush_Pick_Range[2] = 200.00
-


Set TdC_Rush_Pick_Range[3] = 200.00
-


Set TdC_Rush_Pick_Range[4] = 200.00
-


Set TdC_Push_Max_Distance[1] = 450.00
-


Set TdC_Push_Max_Distance[2] = 450.00
-


Set TdC_Push_Max_Distance[3] = 450.00
-


Set TdC_Push_Max_Distance[4] = 450.00
-


Set TdC_Dummy_ColourSet[1] = 0.00
-


Set TdC_Dummy_ColourSet[2] = 40.00
-


Set TdC_Dummy_ColourSet[3] = 100.00
-


Set TdC_Dummy_Transparency = 0.00
-


Set TdC_Dummy_Size[1] = 300.00
-


Set TdC_Dummy_Size[2] = 300.00
-


Set TdC_Dummy_Size[3] = 300.00
-


Set TdC_Dummy_Size[4] = 300.00
-


Set TdC_Dummy_Life_Time = 4.00
-


Set TdC_Effect_Model[1] = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
-


Set TdC_Attachment[2] = overhead
-


Set TdC_Effect_Model[2] = Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
-


Set TdC_Attachment[3] = origin
-


Set TdC_Effect_Model[3] = Abilities\Spells\Orc\Voodoo\VoodooAura.mdl
-


Set TdC_Dummy_Type = Universal Dummy
-


Set TdC_Spell = Tidal Crush
-


Set TdC_Interval = 0.03
-


Trigger - Add to TdC Loop <gen> the event (Time - Every TdC_Interval seconds of game time)
-
-
-
TdC Cast
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to TdC_Spell
-
-

Actions
-


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



If - Conditions
-




TdC_Index_Listener Equal to 0
-
-



Then - Actions
-




Trigger - Turn on TdC Loop <gen>
-
-



Else - Actions
-
-


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



If - Conditions
-




TdC_Recycle_Size Greater than 0
-
-



Then - Actions
-




Set TdC_Recycle_Size = (TdC_Recycle_Size - 1)
-




Set TdC_Current_Index = TdC_Recycle_Container[TdC_Recycle_Size]
-
-



Else - Actions
-




Set TdC_Current_Index = ThS_Index_Size
-




Set TdC_Index_Size = (TdC_Index_Size + 1)
-
-
-


Set TdC_Stage[TdC_Current_Index] = 1
-


Set TdC_Target_Point[TdC_Current_Index] = (Target point of ability being cast)
-


Set TdC_Caster[TdC_Current_Index] = (Triggering unit)
-


Animation - Play TdC_Caster[TdC_Current_Index]'s TdC_Animation_Type animation
-


Set TdC_Owner[TdC_Current_Index] = (Owner of TdC_Caster[TdC_Current_Index])
-


Set TdC_Level[TdC_Current_Index] = (Level of TdC_Spell for TdC_Caster[TdC_Current_Index])
-


Set TdC_Timer[TdC_Current_Index] = TdC_Push_Duration[TdC_Level[TdC_Current_Index]]
-


Set TdC_Index_Container[TdC_Index_Listener] = TdC_Current_Index
-


Set TdC_Index_Listener = (TdC_Index_Listener + 1)
-
-
-
TdC Loop
-

Events
-

Conditions
-

Actions
-


-------- ------------------------------INDEXING START------------------------------ --------
-


For each (Integer TdC_Loop) from 0 to (TdC_Index_Listener - 1), do (Actions)
-



Loop - Actions
-




Set TdC_Current_Index = TdC_Index_Container[TdC_Loop]
-




-------- ------------------------------INDEXING END------------------------------ --------
-




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





If - Conditions
-






(TdC_Caster[TdC_Current_Index] is alive) Equal to TdC_Condition_Config[0]
-
-





Then - Actions
-






Set TdC_Caster_Point = (Position of TdC_Caster[TdC_Current_Index])
-






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







If - Conditions
-








TdC_Stage[TdC_Current_Index] Equal to 1
-
-







Then - Actions
-








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









If - Conditions
-










(Distance between TdC_Caster_Point and TdC_Target_Point[TdC_Current_Index]) Greater than or equal to 128.00
-
-









Then - Actions
-










Set TdC_Angle[TdC_Current_Index] = (Angle from TdC_Caster_Point to TdC_Target_Point[TdC_Current_Index])
-










Custom script: call SetUnitX(udg_TdC_Caster[udg_TdC_Current_Index],GetUnitX(udg_TdC_Caster[udg_TdC_Current_Index]) + udg_TdC_Rush_Speed[udg_TdC_Level[udg_TdC_Current_Index]] * Cos(udg_TdC_Angle[udg_TdC_Current_Index] * bj_DEGTORAD))
-










Custom script: call SetUnitY(udg_TdC_Caster[udg_TdC_Current_Index],GetUnitY(udg_TdC_Caster[udg_TdC_Current_Index]) + udg_TdC_Rush_Speed[udg_TdC_Level[udg_TdC_Current_Index]] * Sin(udg_TdC_Angle[udg_TdC_Current_Index] * bj_DEGTORAD))
-










Set TdC_SE_Spawn = (TdC_Caster_Point offset by TdC_SE_Stay_Distance towards (TdC_Angle[TdC_Current_Index] + TdC_Angle_Add_Quantity[1]) degrees)
-










Special Effect - Create a special effect at TdC_SE_Spawn using TdC_Effect_Model[1]
-










Special Effect - Destroy (Last created special effect)
-










Custom script: call RemoveLocation(udg_TdC_SE_Spawn)
-










Set TdC_SE_Spawn = (TdC_Caster_Point offset by TdC_SE_Stay_Distance towards (TdC_Angle[TdC_Current_Index] + TdC_Angle_Add_Quantity[2]) degrees)
-










Special Effect - Create a special effect at TdC_SE_Spawn using TdC_Effect_Model[1]
-










Special Effect - Destroy (Last created special effect)
-










Custom script: call RemoveLocation(udg_TdC_SE_Spawn)
-










Set TdC_Group[TdC_Current_Index] = (Units within TdC_Rush_Pick_Range[TdC_Level[TdC_Current_Index]] of TdC_Caster_Point)
-










Unit Group - Pick every unit in TdC_Group[TdC_Current_Index] and do (Actions)
-











Loop - Actions
-












Set TdC_Picked_Unit = (Picked unit)
-












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













If - Conditions
-














(TdC_Picked_Unit is alive) Equal to TdC_Condition_Config[1]
-














(TdC_Picked_Unit belongs to an enemy of TdC_Owner[TdC_Current_Index]) Equal to TdC_Condition_Config[2]
-














(TdC_Picked_Unit is A structure) Equal to TdC_Condition_Config[3]
-














(TdC_Picked_Unit is Magic Immune) Equal to TdC_Condition_Config[4]
-
-













Then - Actions
-














Set TdC_Picked_Point = (Position of TdC_Picked_Unit)
-














Set TdC_Angle[TdC_Current_Index] = (Angle from TdC_Caster_Point to TdC_Picked_Point)
-














Set TdC_Carry_Point = (TdC_Caster_Point offset by TdC_Picked_Stay_Distance towards TdC_Angle[TdC_Current_Index] degrees)
-














Unit - Move TdC_Picked_Unit instantly to TdC_Carry_Point
-














Custom script: call RemoveLocation(udg_TdC_Picked_Point)
-














Custom script: call RemoveLocation(udg_TdC_Carry_Point)
-
-













Else - Actions
-
-
-
-
-









Else - Actions
-










Set TdC_Stage[TdC_Current_Index] = 2
-










Unit - Create 1 TdC_Dummy_Type for TdC_Owner[TdC_Current_Index] at TdC_Caster_Point facing Default building facing degrees
-










Set TdC_Dummy[TdC_Current_Index] = (Last created unit)
-










Animation - Change TdC_Dummy[TdC_Current_Index]'s vertex coloring to (TdC_Dummy_ColourSet[1]%, TdC_Dummy_ColourSet[2]%, TdC_Dummy_ColourSet[3]%) with TdC_Dummy_Transparency% transparency
-










Animation - Change TdC_Dummy[TdC_Current_Index]'s size to (TdC_Dummy_Size[TdC_Level[TdC_Current_Index]]%, 0.00%, 0.00%) of its original size
-










Special Effect - Create a special effect attached to the TdC_Attachment[3] of TdC_Dummy[TdC_Current_Index] using TdC_Effect_Model[3]
-










Set TdC_SE_1[TdC_Current_Index] = (Last created special effect)
-










Unit - Add a TdC_Dummy_Life_Time second Generic expiration timer to TdC_Dummy[TdC_Current_Index]
-
-
-
-







Else - Actions
-








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









If - Conditions
-










TdC_Stage[TdC_Current_Index] Equal to 2
-
-









Then - Actions
-










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











If - Conditions
-












TdC_Timer[TdC_Current_Index] Greater than 0.00
-
-











Then - Actions
-












Set TdC_Timer[TdC_Current_Index] = (TdC_Timer[TdC_Current_Index] - TdC_Interval)
-












Unit - Move TdC_Dummy[TdC_Current_Index] instantly to TdC_Caster_Point
-












Set TdC_Group[TdC_Current_Index] = (Units within TdC_Push_Max_Distance[TdC_Level[TdC_Current_Index]] of TdC_Caster_Point)
-












Unit Group - Pick every unit in TdC_Group[TdC_Current_Index] and do (Actions)
-













Loop - Actions
-














Set TdC_Picked_Unit = (Picked unit)
-














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















If - Conditions
-
















(TdC_Picked_Unit is alive) Equal to TdC_Condition_Config[1]
-
















(TdC_Picked_Unit belongs to an enemy of TdC_Owner[TdC_Current_Index]) Equal to TdC_Condition_Config[2]
-
















(TdC_Picked_Unit is A structure) Equal to TdC_Condition_Config[3]
-
















(TdC_Picked_Unit is Magic Immune) Equal to TdC_Condition_Config[4]
-
-















Then - Actions
-
















Set TdC_Picked_Point = (Position of TdC_Picked_Unit)
-
















Set TdC_Angle[TdC_Current_Index] = (Angle from TdC_Caster_Point to TdC_Picked_Point)
-
















Custom script: call SetUnitX(udg_TdC_Picked_Unit,GetUnitX(udg_TdC_Picked_Unit) + udg_TdC_Push_Speed[udg_TdC_Level[udg_TdC_Current_Index]] * Cos(udg_TdC_Angle[udg_TdC_Current_Index] * bj_DEGTORAD))
-
















Custom script: call SetUnitY(udg_TdC_Picked_Unit,GetUnitY(udg_TdC_Picked_Unit) + udg_TdC_Push_Speed[udg_TdC_Level[udg_TdC_Current_Index]] * Sin(udg_TdC_Angle[udg_TdC_Current_Index] * bj_DEGTORAD))
-
















Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_TdC_Effect_Model[2], udg_TdC_Picked_Unit,udg_TdC_Attachment[2]))
-
















Unit - Cause TdC_Caster[TdC_Current_Index] to damage TdC_Picked_Unit, dealing TdC_Push_Damage[TdC_Level[TdC_Current_Index]] damage of attack type TdC_Damage_Type[TdC_Level[TdC_Current_Index]] and damage type Normal
-
















Custom script: call RemoveLocation(udg_TdC_Picked_Point)
-
-















Else - Actions
-
-
-
-
-











Else - Actions
-












Custom script: call DestroyEffect(udg_TdC_SE_1[udg_TdC_Current_Index])
-












-------- ------------------------------INDEXING START------------------------------ --------
-












Set TdC_Index_Listener = (TdC_Index_Listener - 1)
-












Set TdC_Index_Container[TdC_Loop] = TdC_Index_Container[TdC_Index_Listener]
-












Set TdC_Recycle_Container[TdC_Recycle_Size] = TdC_Current_Index
-












Set TdC_Recycle_Size = (TdC_Recycle_Size + 1)
-












Set TdC_Loop = (TdC_Loop - 1)
-












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













If - Conditions
-














TdC_Index_Listener Equal to 0
-
-













Then - Actions
-














Trigger - Turn off TdC Loop <gen>
-
-













Else - Actions
-
-












-------- ------------------------------INDEXING END------------------------------ --------
-
-
-
-









Else - Actions
-
-
-
-






Custom script: call RemoveLocation(udg_TdC_Caster_Point)
-
-





Else - Actions
-
-
-
-
-
-
TdC Cleaner
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


(Unit-type of (Triggering unit)) Equal to TdC_Dummy_Type
-
-

Actions
-


Unit - Remove (Triggering unit) from the game
-
-
