• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

advise on custom ability

Status
Not open for further replies.
Level 5
Joined
Apr 10, 2005
Messages
148
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
 
Level 6
Joined
Mar 29, 2004
Messages
222
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%
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
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
 
Status
Not open for further replies.
Top