[Solved] How to prevent from dying with hp cost ability

Level 4
Joined
Mar 26, 2020
Messages
64
just as the title says, i have this spell that consumes 20% of the HP but i want to make it like huskar's lifebreak in DotA where base of his hp%left as cost (preventing him from dying like with 60/2000 HP and that spell is like cost 20% of the remaining hp to cast therefore he won't die after casting with low hp) [sry i find it hard to explain this] and ends up dying if the caster has 20% or less HP
 
Level 4
Joined
Mar 26, 2020
Messages
64
set life to X [Max (1.00)
^ that part, what configure action is that?
1629949475267.png
 
Level 4
Joined
Mar 26, 2020
Messages
64
1629951159453.png

1629951183841.png

1629951242547.png

im confused after the Set Life (To Value) i don't see arithmetic/math option after clicking the first one[set life of triggering unit] (unless that feature is on reforge coz i use 1.27ver)
 
Level 24
Joined
Feb 9, 2009
Messages
1,766
already done that, i did both percentage and value, still gets killed with less of the conditions cost
View attachment 385853 i put 200% as 20% cost
1567525278327.jpg


1629952817143.png

According to that you are simply taking the life of the triggering unit, subtracting 200.00 and setting the resulting value as its new percentage of it's life, note the % at the end of the line.
Read over the screen shots and use Set life to (VALUE)
End result should look like:
  • Unit - Set life of (Triggering unit) to (Max(1.00, ((Life of (Triggering unit)) - ((Max life of (Triggering unit)) x 0.20))))
Not
  • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 200.00)%
 
Level 24
Joined
Feb 9, 2009
Messages
1,766
The number of brackets in your screenie tell me that you're a big fat fibber.

1590133173315.jpg


1629955468308.png
In my trigger I have value 1 as (1.00), and value2 as (Life of (Triggering unit)) - ((Max life of (Triggering unit)) x 0.20)))

You have value1 as (1.00), but have value2 as (Life of (Triggering unit) and then you go on to subtract ((Max life of (Triggering unit)) x 0.20) from outside Max(x,y).

Review the screenshots earlier and try again.
 
Top