• 🏆 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!

Percentages

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
You will need a system with negative tomes to lower the max HP of the unit. The maths is simple otherwise.

Get the max life of the unit (real) and multiply it by 0.1 to get the damage (we will call this power).
Then lower target units max life by power using the system (if you mean to just damage the unit, then make the caster damage the unit with power damage).
Set the caster's current HP to the caster's current HP + power (reheal).
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Never mind, figured it out.
thanks for the idea Dr super good

  • Leech life
  • Events -
    • Unit - A unit starts the effect of an Ability
  • Conditions -
    • (Ability being cast) is equal to Leech life
  • Actions -
    • Set LL_caster to = (casting unit)
    • Set LL_target to = (target of ability being cast)
    • Unit - Set life of LL_target to ((Percentage life of LL_target) - 10)%
    • Unit - Set life of LL_caster to ((Life of LL_caster) + (Max life of LL_target) / 10))
Btw this trigger with typing thing is cool, i didn't think i could make a complete replica
 
Status
Not open for further replies.
Top