1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Compete in Concept Art Contest - Bounty Hunter . May the best artist's bounty hunter execute!
    Dismiss Notice
  3. The Modeling Mini-Contest #5 - Familiar is up! Compete to design a pet companion to a lonely WC3 Hero of your preference.
    Dismiss Notice
  4. The present for our Christmas Mini-Texturing Contest finally arrived. Check out the results!
    Dismiss Notice
  5. The 6th installment of our Music Contest just got fired up! Now with an Apocalyptic taste. Get started and compete in this musical battle!
    Dismiss Notice
  6. Looking to expand an altered melee race of yours? Join the Advanced Techtree Contest - Recycle, Revise, Reinvent contest!
    Dismiss Notice

[HELP] Increase Max HP AoE

Discussion in 'World Editor Help Zone' started by Striker21, Dec 19, 2010.

  1. Striker21

    Striker21
    Joined:
    Aug 7, 2009
    Messages:
    378
    How to increase all unit around caster (instant cast spell) maximum hitpoint to 3x(caster's strength). I tried a way but it many of leaks and either doesn't work. Thanks 4 advanced
     
  2. ShadowFlare

    ShadowFlare
    Joined:
    Jun 30, 2008
    Messages:
    550
    • Untitled Trigger 001
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to (==) (Ability)
      • Actions
        • Unit Group - Pick every unit in (Units within 150.00 of (Position of (Casting unit))) and do (Actions)
          • Loop - Actions
            • Unit - Set life of (Picked unit) to 150.00
     
  3. GhostThruster

    GhostThruster

    Icon Reviewer

    Joined:
    Jul 24, 2009
    Messages:
    4,803
    You can't increase maximum HP without dummy upgrades.
     
  4. ShadowFlare

    ShadowFlare
    Joined:
    Jun 30, 2008
    Messages:
    550
    Use this to change max hp:

    http://www.hiveworkshop.com/forums/jass-functions-413/vjass-system-unit-properties-142012/

    Without Leaks:

    • Untitled Trigger 001
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to (==) (Ability)
      • Actions
        • Set TempLoc = (Position of (Casting unit))
        • Unit Group - Pick every unit in (Units within 150.00 of TempLoc and do (Actions)
          • Loop - Actions
            • Unit - Set life of (Picked unit) to 150.00
        • Custom Script: call RemoveLocation(udg_TempLoc)
     
  5. ChoovakPetri83

    ChoovakPetri83
    Joined:
    Dec 17, 2010
    Messages:
    34
    +rep of course if this is lawfully
    you must create variable of type Integer. And variable of type real. Then create trigger which will set this variable to (caster's strength) count. Event must be Every 0.01 seconds. Then create trigger with event :
    A unit - used a spell.
    Condition:
    Spell = YourSpell.
    Action:
    set (variable of type real) to (caster's strength)+(x3). Give a unit (variable of type real) hitpoints.
    You must use World Editor Unlimited for this.
    But increasing hit points of units in AoE is impossible or just I don't know.
     
  6. Striker21

    Striker21
    Joined:
    Aug 7, 2009
    Messages:
    378
    I saw a spell that increase max HP aoe in some seconds. It also useful :D thanks
    EDIT: and btw, is there a way to increase unit's stats with items? Ex: you have a spell book item, and use it, there'll be a list of 3 stats. You click stat and your hero will have +that stat?
     
  7. defskull

    defskull
    Joined:
    Mar 27, 2008
    Messages:
    7,969
    It DOES leaks =D
    • Custom script: set bj_wantDestroyGroup = true

    Unit Group leaks =D
    Put this right above the Unit Group action to clean leak

    Also, your formula is wrong:
    • Unit - Set life of (Picked unit) to 150.00

    This will make ALL affected units to be 150 HP, not plus or minus, you just, SET it

    This is the correct formula:
    • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (3.00 x (Real((Strength of (Triggering unit) (Include bonuses))))))


    But as told by others, we cannot change/modify MAXIMUM HP of a unit without upgrades and stuffs
    We can only "heal" or "damage" but not change the MAXIMUM values
     
  8. ShadowFlare

    ShadowFlare
    Joined:
    Jun 30, 2008
    Messages:
    550
    Agh, you caught it :p