Customized healing ability

LmmcDarkY

New Member
Reaction score
1
I need ability for my hero Rexxar. He will have ability that will take off 5% of his hp and heal Misha (his summoned bear) for 15% of it's hp.

I tried to trigger it but can't find how to get those %off and add % to Misha
 

LmmcDarkY

New Member
Reaction score
1
thanks i will use gui cuz jass is too hard for me ;)

EDIT: how can i check if unit is not below 5% hp GUI ??
 

Mahrloc

New Member
Reaction score
5
don't know if there's a function in WE, which gives the percentage but you can still divide the current hp by the max hp and multiply it by 100 and you've got the percentage of the max hp :)
simple math ftw ;)
 

LmmcDarkY

New Member
Reaction score
1
could you show me exactly how can i divide those numbers :p +rep

i just want to make that if unit is below 5% and above 1% then set his health to 1point
 

Mahrloc

New Member
Reaction score
5
ah i see^^
well i haven't got a WE atm, so this is handwritten

Trigger:
  • Heal
    • Events
      • Unit - A unit begins the effect of an ability
    • Conditions
      • (Ability being cast) equal to Your ability
      • (Current Life of (triggering unit) / max Life of (triggering unit)) greater then 5
    • Actions
      • Unit - Set Misha's Life to (current Life of Misha + ( max Life of Misha *(15/100)

also you will have to create a trigger when you summon Misha so you can store the unit in a variable
Trigger:
  • Summon Misha
    • Events
      • Unit - A unit enters playable map area
    • Conditions
      • Unit-type of triggering unit equal to Misha
    • Actions
      • Set Misha = triggering unit

tell me if you've got problems with anything of this :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top