• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] How do i make a passive ability that gives bonus damage based on missing health?

Status
Not open for further replies.
Level 6
Joined
Jul 21, 2019
Messages
168
Hello, first of all thank you all for helping me these days, your insight has been extremely helpful

Now with the topic, i want to know if it is possible to make a passive ability that gives bonus attack damage based on missing health, but i want it to use percentages for both damage and missing health

Example:

Unit gains 10% of his attack damage for every 10% missing health

so if we give this ability to an unit with 10 attack damage, it would gain 1 damage for every 10% missing health

Problem is i don't know how it would behave with decimals? like what if the unit has an attack damage of 15, is the game able to add 1.5 damage or it doesn't support decimals? i see armor works with decimals but bonus attack damage always displays full numbers

*I already know how to make this exact same ability but only with full numbers, and i wanted to know if it's possible to make it work with percentages and decimals so it automatically balances for any unit i give it, (weak unit with 10 damage or strong one with 50 damage)*

Thanks in advance, sorry for broken english!
 
Level 23
Joined
Apr 3, 2018
Messages
460
If you implement your ability through a damage detection system, you can make it deal real damage with decimals.
But you can't put values like 1.5 into an ability's integer fields in the Object editor, if it's like a claws of attack ability. May be use an aura based on combat aura/trueshot aura with a percentage bonus.
 
Status
Not open for further replies.
Top