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

Healig Percentage

Status
Not open for further replies.
Level 2
Joined
Jul 8, 2004
Messages
15
I posted this before but I can't seem to locate the thread. So, I'll ask again. Is there a way to have a healing spell heal a percentage of the unit's max life rather than just a set ammount? Any feedback is appreciated.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Of course. Depending on what you want to use as a base spell for the healing, you can use triggers to do this. If you want to make a spell like Holy Light, here is the trigger.

Event - An unit starts the effect of an ability
COnditions - (Ability being cast) Equal to "Your ability"
Actions - Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of Ability being Cast)) + ((Max life of (Target unit of ability being cast)) * 0.10))

NOTE: You can change the 0.10 value in what you want. Still, remember that 1.00 is 100% and 0.01 is 1%. So, the percent is actually the number after the point, as long as 0 is the number before the point (except 100% which as I said before is 1.00).

Hope it helps you.
 
Level 2
Joined
Jul 8, 2004
Messages
15
Daelin said:
Of course. Depending on what you want to use as a base spell for the healing, you can use triggers to do this. If you want to make a spell like Holy Light, here is the trigger.

Event - An unit starts the effect of an ability
COnditions - (Ability being cast) Equal to "Your ability"
Actions - Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of Ability being Cast)) + ((Max life of (Target unit of ability being cast)) * 0.10))

NOTE: You can change the 0.10 value in what you want. Still, remember that 1.00 is 100% and 0.01 is 1%. So, the percent is actually the number after the point, as long as 0 is the number before the point (except 100% which as I said before is 1.00).

Hope it helps you.
That is Extreemly helpfull, thank you verry much! :D
 
Status
Not open for further replies.
Top