ok so this is a spell that i sort of edited to change it to the way i want it to be..
it basically makes the user deal damage to the units in front of him..
but the problem is,i want more of the same spell but with different cooldowns/effects.
these are the triggers
(the knockback trigger isnt used in this one thats why i want another same ability that has a knockback with a different cooldown)
So do i just copy the triggers and change "(Ability being cast) Equal to Attack" to another dummy spell?
it basically makes the user deal damage to the units in front of him..
but the problem is,i want more of the same spell but with different cooldowns/effects.
these are the triggers
(the knockback trigger isnt used in this one thats why i want another same ability that has a knockback with a different cooldown)
Trigger:
- Beast Attack
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Attack
- Actions
- -------- --------------------------------------------------------- --------
- -------- Spell setup --------
- -------- --------------------------------------------------------- --------
- Set Beast_Attack_Caster = (Triggering unit)
- Set Beast_Attack_Ability_Level = (Level of (Ability being cast) for Beast_Attack_Caster)
- Set Beast_Attack_Location = (Position of Beast_Attack_Caster)
- Set Beast_Attack_Direction = (Facing of Beast_Attack_Caster)
- -------- ------------------------------------------------------------------------------------------------------------------ --------
- -------- -==*////##############\\\\*==- --------
- -------- --------------------------------------------------------- --------
- -------- Yes / No, options --------
- -------- ----- --------
- Set Beast_Attack_Destroy_Trees = True
- Set Beast_Attack_Knock_Back_on = False
- Set Beast_Attack_Random_Distance = False
- -------- ----- --------
- -------- Special effect strings used in KB trigger --------
- -------- ----- --------
- Set Beast_Attack_KB_Special_Effect = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Set Beast_Attack_Destroy_Trees_SE = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
- -------- ----- --------
- -------- How far away the damage group is --------
- -------- ----- --------
- Set Beast_Attack_Base_Offset = 60.00
- Set Beast_Attack_Bonus_Offset = 20.00
- -------- ----- --------
- -------- How big the damage group is --------
- -------- ----- --------
- Set Beast_Attack_Base_Radius = 50.00
- Set Beast_Attack_Bonus_Radius = 40.00
- -------- ----- --------
- -------- Damage type and multiplier --------
- -------- ----- --------
- Set Beast_Attack_Atribute = (Strength of Beast_Attack_Caster (Include bonuses))
- Set Beast_Attack_Damage_Multiplier = 2.50
- -------- ----- --------
- -------- Knockback setings --------
- -------- ----- --------
- Set Beast_Attack_Destruct_Kill_AoE = 150.00
- Set Beast_Attack_KB_Minim_Distance = 20.00
- Set Beast_Attack_KB_Base_Distance = 100.00
- Set Beast_Attack_KB_Bonus_Distance = 50.00
- Set Beast_Attack_KB_Speed = 8.00
- -------- --------------------------------------------------------- --------
- -------- -==*\\\\##############////*==- --------
- -------- ------------------------------------------------------------------------------------------------------------------ --------
- -------- Final spell calculations --------
- -------- --------------------------------------------------------- --------
- Set Beast_Attack_Total_Radius = (Beast_Attack_Base_Radius + (Beast_Attack_Bonus_Radius x (Real(Beast_Attack_Ability_Level))))
- Set Beast_Attack_Total_Offset = (Beast_Attack_Base_Offset + (Beast_Attack_Bonus_Offset x (Real(Beast_Attack_Ability_Level))))
- Set Beast_Attack_Total_Damage = ((Real(Beast_Attack_Atribute)) x (Beast_Attack_Damage_Multiplier x (Real(Beast_Attack_Ability_Level))))
- Set Beast_Attack_KB_Total_Distance = (Beast_Attack_KB_Base_Distance + (Beast_Attack_KB_Bonus_Distance x (Real(Beast_Attack_Ability_Level))))
- -------- --------------------------------------------------------- --------
- -------- Setting the damage area --------
- -------- --------------------------------------------------------- --------
- Set Beast_Attack_Damage_Location = (Beast_Attack_Location offset by Beast_Attack_Total_Offset towards Beast_Attack_Direction degrees)
- Set Beast_Attack_Damage_Group = (Units within Beast_Attack_Total_Radius of Beast_Attack_Damage_Location matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Owner of (Matching unit)) is an enemy of (Owner of Beast_Attack_Caster)
- -------- --------------------------------------------------------- --------
- -------- Creating nice special effects --------
- -------- --------------------------------------------------------- --------
- Unit - Create 1 Dummy for (Owner of Beast_Attack_Caster) at Beast_Attack_Damage_Location facing Beast_Attack_Direction degrees
- Unit - Kill (Last created unit)
- -------- --------------------------------------------------------- --------
- -------- Creating a nice floating text --------
- -------- --------------------------------------------------------- --------
- Floating Text - Create floating text that reads ((String((Integer(Beast_Attack_Total_Damage)))) + !) at Beast_Attack_Location with Z offset 0.00, using font size 13.00, color (90.00%, 5.00%, 5.00%), and 0.00% transparency
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Set the velocity of (Last created floating text) to 40.00 towards 90.00 degrees
- Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
- Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
- -------- --------------------------------------------------------- --------
- -------- Starting the execution --------
- -------- --------------------------------------------------------- --------
- Unit Group - Pick every unit in Beast_Attack_Damage_Group and do (Actions)
- Loop - Actions
- -------- --------------------------------------------------------- --------
- -------- Damaging the units and creating special effects --------
- -------- --------------------------------------------------------- --------
- Unit - Cause Beast_Attack_Caster to damage (Picked unit), dealing Beast_Attack_Total_Damage damage of attack type Normal and damage type Unknown
- Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Special Effect - Destroy (Last created special effect)
- -------- --------------------------------------------------------- --------
- -------- This runs if Knock back is on // True --------
- -------- --------------------------------------------------------- --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Beast_Attack_Knock_Back_on Equal to True
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in Beast_Attack_Damage_Group) Greater than or equal to 1
- Then - Actions
- Trigger - Turn on Beast Attack Knock <gen>
- Else - Actions
- If - Conditions
- -------- --------------------------------------------------------- --------
- -------- Adding units to the knockback group --------
- -------- --------------------------------------------------------- --------
- Set Beast_Attack_LocationII = (Position of (Picked unit))
- Unit - Turn collision for (Picked unit) Off
- Unit Group - Add (Picked unit) to Beast_Attack_KB_Group
- -------- --------------------------------------------------------- --------
- -------- This runs if random distance is on //True --------
- -------- --------------------------------------------------------- --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Beast_Attack_Random_Distance Equal to True
- Then - Actions
- Set Beast_Attack_KB_Total_Distance = (Random real number between Beast_Attack_KB_Minim_Distance and Beast_Attack_KB_Total_Distance)
- Else - Actions
- If - Conditions
- -------- --------------------------------------------------------- --------
- -------- Saving values into hashtable --------
- -------- --------------------------------------------------------- --------
- Set Beast_Attack_KB_Angle = (Angle from Beast_Attack_Location to Beast_Attack_LocationII)
- Hashtable - Save Beast_Attack_KB_Total_Distance as (Key distance) of (Key (Picked unit)) in Beast_Attack_Table
- Hashtable - Save Beast_Attack_KB_Speed as (Key speed) of (Key (Picked unit)) in Beast_Attack_Table
- Hashtable - Save Beast_Attack_KB_Angle as (Key angle) of (Key (Picked unit)) in Beast_Attack_Table
- Custom script: call RemoveLocation(udg_Beast_Attack_LocationII)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- Loop - Actions
- -------- --------------------------------------------------------- --------
- -------- Clearing leaks --------
- -------- --------------------------------------------------------- --------
- Custom script: call RemoveLocation(udg_Beast_Attack_Location)
- Custom script: call RemoveLocation(udg_Beast_Attack_Damage_Location)
- Custom script: call DestroyGroup(udg_Beast_Attack_Damage_Group)
- Events
Trigger:
- Beast Attack Knock
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- Actions
- -------- ================================================================== --------
- -------- LEAVE THIS TRIGGER AS IT IS --------
- -------- ================================================================== --------
- Unit Group - Pick every unit in Beast_Attack_KB_Group and do (Actions)
- Loop - Actions
- -------- --------------------------------------------------------- --------
- -------- Loading values --------
- -------- --------------------------------------------------------- --------
- Set Beast_Attack_KB_Total_Distance = (Load (Key distance) of (Key (Picked unit)) from Beast_Attack_Table)
- Set Beast_Attack_KB_Speed = (Load (Key speed) of (Key (Picked unit)) from Beast_Attack_Table)
- Set Beast_Attack_KB_Angle = (Load (Key angle) of (Key (Picked unit)) from Beast_Attack_Table)
- -------- --------------------------------------------------------- --------
- -------- Checking the remaining distance --------
- -------- --------------------------------------------------------- --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Beast_Attack_KB_Total_Distance Greater than 0.00
- Then - Actions
- -------- --------------------------------------------------------- --------
- -------- Setting the knockback locations --------
- -------- --------------------------------------------------------- --------
- Set Beast_Attack_KB_LocI = (Position of (Picked unit))
- Set Beast_Attack_KB_LocII = (Beast_Attack_KB_LocI offset by Beast_Attack_KB_Speed towards Beast_Attack_KB_Angle degrees)
- Hashtable - Save (Beast_Attack_KB_Total_Distance - Beast_Attack_KB_Speed) as (Key distance) of (Key (Picked unit)) in Beast_Attack_Table
- -------- --------------------------------------------------------- --------
- -------- Removing a unit from unit group, if the pathing is off --------
- -------- --------------------------------------------------------- --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Terrain pathing at Beast_Attack_KB_LocII of type Walkability is off) Equal to True
- Then - Actions
- Unit - Turn collision for (Picked unit) On
- Unit Group - Remove (Picked unit) from Beast_Attack_KB_Group
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Beast_Attack_Table
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in Beast_Attack_KB_Group) Equal to 0
- Then - Actions
- Trigger - Turn off Beast Attack Knock <gen>
- Else - Actions
- If - Conditions
- Else - Actions
- -------- --------------------------------------------------------- --------
- -------- Moving a unit --------
- -------- --------------------------------------------------------- --------
- Unit - Move (Picked unit) instantly to Beast_Attack_KB_LocII
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Random real number between 1.00 and 10.00) Less than or equal to 3.33
- Then - Actions
- -------- --------------------------------------------------------- --------
- -------- Creating a nice special effect --------
- -------- --------------------------------------------------------- --------
- Special Effect - Create a special effect attached to the origin of (Picked unit) using Beast_Attack_KB_Special_Effect
- Special Effect - Destroy (Last created special effect)
- Else - Actions
- If - Conditions
- -------- --------------------------------------------------------- --------
- -------- If destroy tress is on //True this will destroy trees --------
- -------- --------------------------------------------------------- --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Beast_Attack_Destroy_Trees Equal to True
- Then - Actions
- Destructible - Pick every destructible within Beast_Attack_Destruct_Kill_AoE of Beast_Attack_KB_LocII and do (Actions)
- Loop - Actions
- Set Beast_Attack_KB_LocIII = (Position of (Picked destructible))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked destructible) is alive) Equal to True
- Then - Actions
- Special Effect - Create a special effect at Beast_Attack_KB_LocIII using Beast_Attack_Destroy_Trees_SE
- Special Effect - Destroy (Last created special effect)
- Else - Actions
- If - Conditions
- Destructible - Kill (Picked destructible)
- Custom script: call RemoveLocation(udg_Beast_Attack_KB_LocIII)
- Loop - Actions
- Destructible - Pick every destructible within Beast_Attack_Destruct_Kill_AoE of Beast_Attack_KB_LocII and do (Actions)
- Else - Actions
- If - Conditions
- -------- --------------------------------------------------------- --------
- -------- Clearing leaks --------
- -------- --------------------------------------------------------- --------
- Custom script: call RemoveLocation(udg_Beast_Attack_KB_LocI)
- Custom script: call RemoveLocation(udg_Beast_Attack_KB_LocII)
- Else - Actions
- -------- --------------------------------------------------------- --------
- -------- Ending execution, removing units, clearing hashtable --------
- -------- --------------------------------------------------------- --------
- Unit - Turn collision for (Picked unit) On
- Unit Group - Remove (Picked unit) from Beast_Attack_KB_Group
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Beast_Attack_Table
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in Beast_Attack_KB_Group) Equal to 0
- Then - Actions
- Trigger - Turn off Beast Attack Knock <gen>
- Else - Actions
- If - Conditions
- If - Conditions
- Loop - Actions
- Events
So do i just copy the triggers and change "(Ability being cast) Equal to Attack" to another dummy spell?