1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The SharpCraft World Editor Extended (WEX) has been updated for the latest Warcraft 3 version: Forum.
    Dismiss Notice
  3. The Paired Modeling/Texturing Contest #3 - Leaders has begun! Artists group up and struggle! May the best team lead the run.
    Dismiss Notice
  4. The long awaited results for Mini-Mapping Contest #13 is here! Congratulate the winners!
    Dismiss Notice
  5. Vote for the best Concept Art Contest - Bounty Hunter entry!
    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:
    377
    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:
    551
    • 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

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

    ShadowFlare

    Joined:
    Jun 30, 2008
    Messages:
    551
    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:
    377
    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:
    551
    Agh, you caught it :p