Tutorials or guide for Back or side attack bonus damage?

Dangime

New Member
Reaction score
1
I'm looking for a guide or some assistance in adding damage multipliers to side and back attack damage based on the angle at which units are being hit. This looks possible based on some of the real number commparisions in the pulldown menus, but I don't really know how to get started on it. Thanks.
 
Z

Zell

Guest
You need to compare the angles the attacked and attacking units are facing. This is used for both Bristleback and Rikimaru. I know how to reverse the damage, but not prevent it, based on this. The main difference is that reversing it won't help if the damage kills the unit first.
 

Dangime

New Member
Reaction score
1
Well my goal is to add extra damage after the fact if it is striking a side profile greater than 45 degrees, and even more if its near 180 and striking the rear.
 
Z

Zell

Guest
Extra raw damage, or extra % damage? The former is simple, the latter is harder.
 

Dangime

New Member
Reaction score
1
Unit - A unit Is attacked
Set DamageDone = (Damage taken)
Set AttackAngle = (Facing of (Attacking unit))
Set DefenseAngle = (Facing of (Attacked unit))
Set AngleAdds = (AttackAngle - DefenseAngle)
Set AngleAdds = (Abs(AngleAdds))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngleAdds Less than or equal to 45.00
Then - Actions
Wait 1.00 seconds
Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (DamageDone x 2.00) damage of attack type Normal and damage type Normal
Special Effect - Create a special effect at ((Position of (Attacked unit)) offset by (0.00, 60.00)) using Abilities\Spells\Other\BreathOfFire\BreathOfFireDamage.mdl
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngleAdds Less than or equal to 135.00
Then - Actions
Wait 1.00 seconds
Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (DamageDone x 0.50) damage of attack type Normal and damage type Normal
Special Effect - Create a special effect at ((Position of (Attacked unit)) offset by (0.00, 60.00)) using Abilities\Weapons\FlyingMachine\FlyingMachineImpact.mdl
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngleAdds Greater than 135.00
Then - Actions
Wait 1.00 seconds
Special Effect - Create a special effect at ((Position of (Attacked unit)) offset by (0.00, 0.00)) using Abilities\Spells\Human\Defend\DefendCaster.mdl
Else - Actions
Do nothing
Set AngleAdds = 0.00

I think its working. Could be wrong. It does the right animation, so its probably doing the damage too.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top