• 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.

HP Cost ?

Status
Not open for further replies.
Level 4
Joined
Dec 2, 2011
Messages
76
or just decrease the caster unit hp when he attack or cast with trigger (action-unit->set unit life (to value)) :)

  • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 5.00)

Your final product would look something like this:

  • Events
  • Unit - A unit Finishes casting an ability
  • Conditions
  • (Ability being cast) Equal to *your spell here*
  • Actions
  • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 5.00)
I'm curious though, how do I add the -5 to the (Life of (Triggering unit)?
 
Level 7
Joined
Apr 21, 2011
Messages
93
Or if you want the spell to be uncastable if the hero has too low health, you can make a dummy cast the spell instead, give your hero a Channel ability, and a trigger to check whether your hero has enough hp to cast the spell.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
First off, there must be a condition to cast the spell, your HP needs to be 100 and above to use the spell, HP >= 10% and whatsoever

Here's the condition for a spell that requires a HP of 100 and above (it will cancel the ability once it is casted and the condition does not meet)
  • HP 100 And Above
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Beastial Form
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of (Triggering unit)) Greater than or equal to 100.00
        • Then - Actions
        • Else - Actions
          • Unit - Order (Triggering unit) to Stop
This is for percentage condition check
  • HP 10% And Above
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Beastial Form
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Percentage life of (Triggering unit)) Greater than or equal to 10.00
        • Then - Actions
        • Else - Actions
          • Unit - Order (Triggering unit) to Stop
This is only for reduction check, for reduction itself, refer to the triggers above (related posts)
 
Status
Not open for further replies.
Top