[Trigger] another hand if possible.

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I didnt know if i could ask for two different things ina single post. Sorry for the double post.
I have a few triggers where if the win a duel, the game proceeds. What i need is winning the duel with a certain amount of hitpoints, a certain sound is played depending on the amount of hitpoints remaining. 15% life left one sound is played... or 99% health left another sound is played... Any Help???
 
Okay thats all fine and all with the lower amount, being so close to zero. But with the higher amount, heros have levels and tomes for stat upgrades. Their strengths will be greater over time. Is there any way to check (upon death of the duelers) if the percentage is over say 99%?
 
Yes??? I mean why you are asking makes no sense as you have both natives capable of returning a unit / heroes current and max HP (mana as well but you do not need that).

Simply divide the current HP by the max HP and you get the HP percentage in multiplyer form. (less than or equal to 1.0 but greater than or equal to 0)

You then run your conditional stetements on the percentage you calculated.
 
Status
Not open for further replies.
Back
Top