Solu9
You can change this now in User CP.
- Reaction score
- 216
The trigger:
The ability:
Based on channel. Instant no target.
The problem:
Depending on the positioning on the map this ability either work as intended (hits every enemy in a 180 angle) or only hits 1 enemy.
If the ability is used on the left portion of the map it hits only 1.
If the ability is used on the right portion of the map it hits every enemy in 180 degrees.
What is wrong with the trigger?
Trigger:
- Cleave
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Cleave
- Actions
- Set Sweeping_CastUnit = (Position of (Triggering unit))
- Set Sweeping_TargetUnit = ((Position of (Casting unit)) offset by 300.00 towards (Facing of (Triggering unit)) degrees)
- Set TempUnitGroup_1 = (Units within 300.00 of Sweeping_TargetUnit matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Neutral Hostile)))
- Unit Group - Pick every unit in TempUnitGroup_1 and do (Actions)
- Loop - Actions
- Set Sweeping_Loc = (Position of (Picked unit))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Integer((Angle from Sweeping_CastUnit to Sweeping_Loc))) Greater than or equal to (Integer(((Angle from Sweeping_CastUnit to Sweeping_TargetUnit) - 90.00)))
- (Integer((Angle from Sweeping_CastUnit to Sweeping_Loc))) Less than or equal to (Integer(((Angle from Sweeping_CastUnit to Sweeping_TargetUnit) + 90.00)))
- Then - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Strength of (Triggering unit) (Include bonuses)))) + ((Real((Level of Cleave for (Triggering unit)))) x 20.00)) damage of attack type Normal and damage type Normal
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HumanBloodFootman.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call DestroyGroup (udg_TempUnitGroup_1)
- Custom script: call RemoveLocation (udg_Sweeping_TargetUnit)
- Custom script: call RemoveLocation (udg_Sweeping_CastUnit)
- Custom script: call RemoveLocation (udg_Sweeping_Loc)
- Else - Actions
- Custom script: call RemoveLocation (udg_Sweeping_Loc)
- Custom script: call DestroyGroup (udg_TempUnitGroup_1)
- Custom script: call RemoveLocation (udg_Sweeping_CastUnit)
- Custom script: call RemoveLocation (udg_Sweeping_TargetUnit)
- If - Conditions
- Loop - Actions
- Events
The ability:
Based on channel. Instant no target.
The problem:
Depending on the positioning on the map this ability either work as intended (hits every enemy in a 180 angle) or only hits 1 enemy.
If the ability is used on the left portion of the map it hits only 1.
If the ability is used on the right portion of the map it hits every enemy in 180 degrees.
What is wrong with the trigger?