• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Restoring Hp Based on Missing Hp

Status
Not open for further replies.
Level 1
Joined
Apr 12, 2020
Messages
5
Hello!

I am having trouble with this: I want to heal each unit in a unit group for 15% of their missing hp. However, after testing it a bit, war3 says my max life is always same as life of a unit?

What am I doing wrong?

  • Apply Healing
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Blood
    • Actions
      • Set xxx_bloodloc = (Position of (Item being manipulated))
      • Set xxx_drawbloodgroup = (Units within 600.00 of xxx_bloodloc matching (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True))
      • Unit Group - Pick every unit in xxx_drawbloodgroup and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (0.15 x ((Max life of (Picked unit)) - (Life of (Picked unit)))))
          • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Human\Heal\HealTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_xxx_bloodloc)
      • Custom script: call DestroyGroup(udg_xxx_drawbloodgroup)
 
I checked percentage life as well, it always returns 100.000, except when unit is very low on hp. Really don't know whats going on. Corrupt files?
 
Thank you I figured it out...after so many tests and debugs, I forgot to remove heal from my consumable.
 
Status
Not open for further replies.
Back
Top