• 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.

[General] How to put the green bonus damage from a unit in a variable?

Level 13
Joined
Sep 11, 2013
Messages
484
Greetings!

I wanted to put in a floating text the entire damage that a specific unit has before reduction.
For example - My unit has..
16 - Base Damage
1 - Number of Dice
21 - Sides per Die

If I want to calculate the average damage per hit, I will use this formula.
  • Set VariableSet IntegerBaseDamageStryg = ((((Unit: (Damage source)'s Weapon Integer Field: Attack Damage Base ('ua1b') at Index:0) + (Unit: (Damage source)'s Weapon Integer Field: Attack Damage Number Of Dice ('ua1d') at Index:0)) + ((Unit: (Damage source)'s Weapon Integer Field: Attack Damage Base
[(16+1) + (16+21)] / 2 - And that works well.

The problem appear when I want to put the bonus (green) damage in this formula.
For example. My unit will use Roar (25% bonus (green) damage) or other kind of (green) bonus damage.
I don't know how to put that bonus (green) damage in the above formula.

I want to put that average damage + bonus green damage in a floating text integer.

Is there a way to do that? :peasant-confused:

The help will be appreaciated!

Edit: Another good question is.. How can I find and put in a variable the damage deal by a specific unit before reduction?
 
Last edited:
Top