I got this ability from popo80000's Spiritbreaker(Barathrum) Spellpack Thread.
I imported it from his triggers but it is not working. Can you figure out where it has gone wrong?
I modified some parts of the triggers so it can be applicable to my ability.
Please help thank you.
War Axe Bash is a Bash-based ability with zero fields.
I imported it from his triggers but it is not working. Can you figure out where it has gone wrong?
I modified some parts of the triggers so it can be applicable to my ability.
Trigger:
- Greater Bash Start
- Events
- Unit - A unit Learns a skill
- Conditions
- (Learned Hero Skill) Equal to War Axe Bash
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Learning Hero) is in GreaterBash_CheckGroup) Not equal to True
- Then - Actions
- Unit Group - Add (Learning Hero) to GreaterBash_StartGroup
- Unit Group - Add (Learning Hero) to GreaterBash_CheckGroup
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Trigger:
- Greater Bash
- Events
- Unit - A unit Is attacked
- Conditions
- ((Attacked unit) is A structure) Not equal to True
- ((Attacking unit) is in GreaterBash_StartGroup) Equal to True
- ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
- Actions
- Set GreaterBash_Random = (Random integer number between 1 and 100)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GreaterBash_Random Less than or equal to 99
- Then - Actions
- Set GreaterBash_Counts = (GreaterBash_Counts + 1)
- Set GreaterBash_Caster[GreaterBash_Counts] = (Attacking unit)
- Set GreaterBash_Point[1] = (Position of (Attacking unit))
- Set GreaterBash_Point[2] = (Position of (Attacked unit))
- Set GreaterBash_Angle[GreaterBash_Counts] = (Angle from GreaterBash_Point[1] to GreaterBash_Point[2])
- Set GreaterBash_SlideDistance[1] = 140.13
- Set GreaterBash_SlideDistance[2] = 169.63
- Set GreaterBash_SlideDistance[3] = 199.13
- Set GreaterBash_SlideDistance[4] = 228.63
- Set GreaterBash_SlideDistance[5] = 260.00
- Set GreaterBash_DistanceMoved[GreaterBash_Counts] = 0.00
- Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (25.00 x (Real((Level of War Axe Bash for (Attacking unit))))) damage of attack type Hero and damage type Normal
- Special Effect - Create a special effect attached to the weapon of GreaterBash_Caster[GreaterBash_Counts] using Abilities\Weapons\Rifle\RifleImpact.mdl
- Special Effect - Destroy (Last created special effect)
- Set GreaterBash_Victim[GreaterBash_Counts] = (Attacked unit)
- Unit - Create 1 for (Owner of (Attacking unit)) at GreaterBash_Point[1] facing Default building facing degrees
- Unit - Set the custom value of (Last created unit) to GreaterBash_Counts
- Unit Group - Add (Last created unit) to GreaterBash_UnitGroup
- Unit - Turn collision for GreaterBash_Victim[GreaterBash_Counts] Off
- Unit Group - Remove GreaterBash_Caster[GreaterBash_Counts] from GreaterBash_StartGroup
- Custom script: call RemoveLocation (udg_GreaterBash_Point[1])
- Custom script: call RemoveLocation (udg_GreaterBash_Point[2])
- Trigger - Turn on Greater Bash Move <gen>
- Else - Actions
- If - Conditions
- Events
Trigger:
- Greater Bash Move
- Events
- Time - Every 0.02 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in GreaterBash_UnitGroup and do (Actions)
- Loop - Actions
- Set GreaterBash_CustomValue = (Custom value of (Picked unit))
- Set GreaterBash_Point[3] = (Position of GreaterBash_Victim[GreaterBash_CustomValue])
- Set GreaterBash_Point[4] = (GreaterBash_Point[3] offset by 2.95 towards GreaterBash_Angle[GreaterBash_CustomValue] degrees)
- Destructible - Pick every destructible within 120.00 of GreaterBash_Point[4] and do (Actions)
- Loop - Actions
- Destructible - Kill (Picked destructible)
- Loop - Actions
- Unit - Move GreaterBash_Victim[GreaterBash_CustomValue] instantly to GreaterBash_Point[4]
- Special Effect - Create a special effect at GreaterBash_Point[3] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Set GreaterBash_DistanceMoved[GreaterBash_CustomValue] = (GreaterBash_DistanceMoved[GreaterBash_CustomValue] + 2.95)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GreaterBash_DistanceMoved[GreaterBash_CustomValue] Greater than or equal to GreaterBash_SlideDistance[(Level of War Axe Bash for GreaterBash_Caster[GreaterBash_CustomValue])]
- Then - Actions
- Unit Group - Add GreaterBash_Caster[GreaterBash_CustomValue] to GreaterBash_StartGroup
- Unit - Turn collision for GreaterBash_Victim[GreaterBash_CustomValue] On
- Unit - Kill (Picked unit)
- Unit Group - Remove (Picked unit) from GreaterBash_UnitGroup
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation (udg_GreaterBash_Point[3])
- Custom script: call RemoveLocation (udg_GreaterBash_Point[4])
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in GreaterBash_UnitGroup) Equal to 0
- Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
- If - Conditions
- Unit Group - Pick every unit in GreaterBash_UnitGroup and do (Actions)
- Events
Please help thank you.
War Axe Bash is a Bash-based ability with zero fields.