Hey guys! I recently implemented
Snippet - GUI-Friendly Damage Detection
Into my map however, I quickly realized it doesn't account for any armor reduction whatsoever. I tried to adjust the 'show damage' section into this.
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(GDD_DamagedUnit has buff Ultravision) Equal to True
Then - Actions
Floating Text - Create floating text that reads (String(GDD_Damage)) at (Position of GDD_DamageSource) with Z offset 30.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Else - Actions
Set UnitArmor[1] = ((Armor of GDD_DamagedUnit) x 0.06)
Set UnitArmor[2] = (1.00 + ((Armor of GDD_DamagedUnit) x 0.06))
Set UnitArmor[3] = (UnitArmor[1] / UnitArmor[2])
Set UnitArmor[3] = (1.00 - UnitArmor[3])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
GDD_Damage Greater than 0.00
Then - Actions
Floating Text - Create floating text that reads (String((GDD_Damage x UnitArmor[3]))) at (Position of GDD_DamageSource) with Z offset 30.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Else - Actions
Do nothing
(In case you're wondering I'm making my spells apply the buff Ultravision so I can detect what type of damage it is in order to change the text color).
Wait I'm confused suddenly it shows spell damage properly when I make my scaling ability do this.
Then - Actions
Unit - Cause (Casting unit) to damage (Picked unit), dealing (1.00 x (Real((Strength of (Casting unit) (Include bonuses))))) damage of attack type Spells and damage type Magic
(Had to make Damage type magic)
I still have a problem with it displaying Siege damage properly when it's hitting Fortified. (It's showing 119 damage on the damage display however, the tower is actually taking 134 damage.)
Edit: Okay well scratch everything I said I'm an idiot however, the damage showing doesn't seem to properly work when a hero does 1 damage. It still shows 1.000 instead of 9.43 like it's supposed to (When attacking a unit with 1 armor and 6 % reduction).
Snippet - GUI-Friendly Damage Detection
Into my map however, I quickly realized it doesn't account for any armor reduction whatsoever. I tried to adjust the 'show damage' section into this.
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(GDD_DamagedUnit has buff Ultravision) Equal to True
Then - Actions
Floating Text - Create floating text that reads (String(GDD_Damage)) at (Position of GDD_DamageSource) with Z offset 30.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Else - Actions
Set UnitArmor[1] = ((Armor of GDD_DamagedUnit) x 0.06)
Set UnitArmor[2] = (1.00 + ((Armor of GDD_DamagedUnit) x 0.06))
Set UnitArmor[3] = (UnitArmor[1] / UnitArmor[2])
Set UnitArmor[3] = (1.00 - UnitArmor[3])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
GDD_Damage Greater than 0.00
Then - Actions
Floating Text - Create floating text that reads (String((GDD_Damage x UnitArmor[3]))) at (Position of GDD_DamageSource) with Z offset 30.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Else - Actions
Do nothing
(In case you're wondering I'm making my spells apply the buff Ultravision so I can detect what type of damage it is in order to change the text color).
Wait I'm confused suddenly it shows spell damage properly when I make my scaling ability do this.
Then - Actions
Unit - Cause (Casting unit) to damage (Picked unit), dealing (1.00 x (Real((Strength of (Casting unit) (Include bonuses))))) damage of attack type Spells and damage type Magic
(Had to make Damage type magic)
I still have a problem with it displaying Siege damage properly when it's hitting Fortified. (It's showing 119 damage on the damage display however, the tower is actually taking 134 damage.)
Edit: Okay well scratch everything I said I'm an idiot however, the damage showing doesn't seem to properly work when a hero does 1 damage. It still shows 1.000 instead of 9.43 like it's supposed to (When attacking a unit with 1 armor and 6 % reduction).
Last edited: