• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] ATtack Damage

Status
Not open for further replies.
Level 23
Joined
Oct 20, 2012
Messages
3,075
You can't grab a unit's attack damage ingame unless you calculate (?) it within your triggers. But if you calculate it, you'd have to consider a lot of factors too, like upgrades that would change your unit's damage, aura damage bonus, item bonus (if your unit can carry items), and if it's a hero, you'd have to consider bonus damage given by stats and his passive abilities.

Hope that's useful info. ^^
 
Level 8
Joined
Nov 9, 2011
Messages
326
You can't grab a unit's attack damage ingame unless you calculate (?) it within your triggers. But if you calculate it, you'd have to consider a lot of factors too, like upgrades that would change your unit's damage, aura damage bonus, item bonus (if your unit can carry items), and if it's a hero, you'd have to consider bonus damage given by stats and his passive abilities.

Hope that's useful info. ^^

Yea i actually thought of this too but its lot of work tbh
thanks!
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
I have a system I use (although it isn't the most efficient) I use a damage detection system and then every time damage is dealt by a certain unit I save it in a hashtable. Then when he casts a certain spell I use the saved damage plus whatever blah blah blah. The problem is that it doesn't calculate the attack damage exactly it just remembers the last damage dealt. Therefore if the ability is used right after a crit it adds extra damage to the spell. (I just added that to the abilities description haha) It seems to work ok, but there is probably a better way.
 
Level 8
Joined
Nov 9, 2011
Messages
326
I have a system I use (although it isn't the most efficient) I use a damage detection system and then every time damage is dealt by a certain unit I save it in a hashtable. Then when he casts a certain spell I use the saved damage plus whatever blah blah blah. The problem is that it doesn't calculate the attack damage exactly it just remembers the last damage dealt. Therefore if the ability is used right after a crit it adds extra damage to the spell. (I just added that to the abilities description haha) It seems to work ok, but there is probably a better way.

Here is my thinking
Make 2 variables

AttackDamage and PlayerTotalAttackDamage

Set hero damage to 1-1 and everytime unit equips (ur hero) some item (also stored into a varible with its own damage) add the specific amount to the PlayerTotalAttackDamage Variable. Now use Some damage detection system
And everytime the damage is physical (meaning attack) set the Amount(damage) to a PlayerTotalAttackDAmage(criticals included if the DDS is good)
 
Level 8
Joined
Nov 9, 2011
Messages
326
Status
Not open for further replies.
Top