Warcraft III resources & community, 2003–2006 · archived

advise on custom ability

4 posts
#1

advise on custom ability

I wanted to make a custom ability called "Sacrifice"
The Description is: Sacrifice 50% of your life to deal great damage to the enemies around you" First I tried to make it trigger-wise. I put Event>- Unit begins Casting an ability, Conditions>- Ability equal to Sacrifice,Then Action>- Set (unit of ability begin cast/casting unit) to life percentage-50%,I thought that would be okay, but I thought,what if the HP was lower than 50%? It would heal the unit. So can anyone help me with this ability?
-Sp4wNeD
#2
the events would look a little like this...

Actions
Unit - Set life of (Triggering unit) to ((Percentage life of (Triggering unit)) - 50.00)%

Thus, this always lowers the health by 50% of the maximum hp, rather than always setting it to 50%
#3
You can replace -50 with /2 if you need only to half current health, I'd add. ^_^
#4
For bounty you could try this

->Pick Up Every Unit within x range of (Position of (Casting Unit)) matching condition ((Matching Unit) is an enemy of (Casting Unit)) equal to true and do actions
- Order (Triggering Unit) to damage (Picked Unit) for Life of (Triggering Unit)*0.50, Magic, Fire.
-> Set Life of(Triggering Unit) to ((Current Life) of (Triggering Unit))*0.50

~Daelin