• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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

Status
Not open for further replies.
Level 9
Joined
Jul 21, 2019
Messages
177
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!
 
Status
Not open for further replies.
Back
Top