1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Participate in Blizzard's Public Test Realm to give them feedback on the upcoming patches. Info is here.
    Dismiss Notice
  3. Take part in forum poll and decide the winner of Icon Contest #16!
    Dismiss Notice
  4. Congratulate the winners of the first ATC contest!
    Dismiss Notice
  5. Zwiebelchen is hosting a special UI texturing contest. Whomever wins will get a $150 reward through paypal! Come along and draw your texturing tools for the Fantastic Adventurer UI contest.
    Dismiss Notice
  6. Sneak, pickpocket and assassinate! Create a stealth map in Mini-Mapping Contest #14!
    Dismiss Notice
  7. Music Contest #8 - Hive Soundtrack is up! Create the soundtrack for the upcoming videos of Hive Workshop's YouTube Channel.
    Dismiss Notice

Change max health of a unit by a percentage through triggers?

Discussion in 'World Editor Help Zone' started by Karzama, Apr 8, 2012.

  1. Karzama

    Karzama

    Joined:
    Oct 16, 2010
    Messages:
    546
    Resources:
    0
    Resources:
    0
    I've been trying to make an ability that will increase the targets hit points by X%. But I can't find any way to do this as a percentage, any ideas?
     
  2. Vizel

    Vizel

    Joined:
    Jan 30, 2009
    Messages:
    1,040
    Resources:
    0
    Resources:
    0
    Do you mean that you're trying to heal a unit for x% or that you're trying to increase the max health of a unit by x%?

    I assume the second.

    EDIT: I didn't even read the whole title, so this was a pretty worthless question. >.>
     
  3. Lifee_72

    Lifee_72

    Joined:
    Mar 5, 2009
    Messages:
    246
    Resources:
    0
    Resources:
    0
    NVM i thought u want to increase hp by 100% only.
     
  4. Vizel

    Vizel

    Joined:
    Jan 30, 2009
    Messages:
    1,040
    Resources:
    0
    Resources:
    0
    From a percentile standpoint, I cannot think of doing it any way besides:

    For Hero - The creation of a ton of abilities to cover every possible amount of health and checking for the percentage of health to determine which ability to use.

    Unit (With Static HP) - Create an ability for each unit type that you have (So, one ability for the peasant, one for a Footman, etc) and run a unit-type check and match the appropriate ability.

    Either way is extremely obnoxious and time-consuming, though.
     
  5. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,969
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Your percentage based on... ?
    Current HP or Max HP ?
     
  6. Meticulous

    Meticulous

    Joined:
    Nov 15, 2007
    Messages:
    779
    Resources:
    0
    Resources:
    0
    Here you go. This example is permanent but you should be able to use the same method for a temporary boost.
     

    Attached Files:

  7. Karzama

    Karzama

    Joined:
    Oct 16, 2010
    Messages:
    546
    Resources:
    0
    Resources:
    0
    I wanted it to be permanent... And the percentages will be 10%, 20%, 30%, 40% and 50%.
     
  8. Meticulous

    Meticulous

    Joined:
    Nov 15, 2007
    Messages:
    779
    Resources:
    0
    Resources:
    0
    Well that trigger will work perfectly for you because it scales by 10% per level for any number of levels, so you won't even have to change anything.
     
  9. wardonis

    wardonis

    Joined:
    Apr 9, 2012
    Messages:
    23
    Resources:
    0
    Resources:
    0
    I've looked through the map and its triggers but I'm a bit lost on it. I'm trying to something very similar. I want to use a research upgrade to increase a hero's max mana by 2% with each research rank (15 ranks). but without affecting the char's str, int or agi at all.

    I also want to do the same thing with mana regen, have an upgrade that will increase regen rate of a hero without affecting the stats.