X-maul
AKA: Demtrod
- Reaction score
- 201
Damage displayed - exeed max hp?
I've created a trigger which should display the amount of damage a spell deals.
It works just fine, despite one thing: It does not display more than the max amount of hp. If I attack a unit with 35 hp with a spell dealing 80 damage it only displays 35, and not 80.
Does any of you guys know how to get it to display the damage the spell deals?
I've created a trigger which should display the amount of damage a spell deals.
It works just fine, despite one thing: It does not display more than the max amount of hp. If I attack a unit with 35 hp with a spell dealing 80 damage it only displays 35, and not 80.
Code:
Ability damage
Events
Unit - Any Unit takes Fatal or Non-Fatal Spell damage (from Any effects)
Local Variables
Text tag1 = No Text Tag <Text Tag>
Text tag1 2 = No Text Tag <Text Tag>
Conditions
Actions
Text Tag - Create a text tag with the text (Text((Triggering damage amount)) with Normal decimal places (Do Not use delimiters, precision limits: 0 to 0)) for (Player group((Owner of (Damaging unit)))), using a font size of 22, at (Position of (Triggering unit)) and height offset 1.0, initially Visible, and fog of war enforcement set to false
Text Tag - Set the velocity of (Last created text tag) to 0.1 coordinates per second at an angle of 35.0 degrees from horizontal
Text Tag - Set Text color(s) for (Last created text tag) to (100%, 0%, 0%)
Variable - Set Text tag1 = (Last created text tag)
Text Tag - Create a text tag with the text (Text((Triggering damage amount)) with Normal decimal places (Do Not use delimiters, precision limits: 0 to 0)) for (Player group((Owner of (Triggering unit)))), using a font size of 22, at (Position of (Triggering unit)) and height offset 1.0, initially Visible, and fog of war enforcement set to false
Text Tag - Set the velocity of (Last created text tag) to 0.1 coordinates per second at an angle of 35.0 degrees from horizontal
Text Tag - Set Text color(s) for (Last created text tag) to (50%, 0%, 0%)
Variable - Set Text tag1 2 = (Last created text tag)
General - Wait 2.5 Game Time seconds
Text Tag - Destroy Text tag1
Text Tag - Destroy Text tag1 2