1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice
  3. After a long wait, the results for Terraining Contest #18 are finally out! Drop by and congratulate the winners!
    Dismiss Notice
  4. The poll for Concept Art Contest #9 is up! Cast your vote for your favourite entry!
    Dismiss Notice
  5. Hero Contest #8 is up and running! This time it's a joint contest between artists and coders. Go here for team matchmaking.
    Dismiss Notice
  6. Our first StarCraft contest, The Galaxy Terraining Contest #1 - World Wonders has started. Enter to show off your Galaxy Editor skills and win a custom rank icon among other things.
    Dismiss Notice
  7. Ever wanted to get your sets ready for fast texturing while still having fun? Now it is possible with our newest Mini-Texturing Contest.
    The Skeleton Units need your dire help!
    Dismiss Notice
  8. The poll for Techtree Contest #11 is up! Cast your vote for your favorite entry.
    Dismiss Notice
  9. Take part in a Futuristic musical experience with our very own Music Contest. The 5th edition has finally arrived after a long time.
    Dismiss Notice
  10. 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:
    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

    Icon Reviewer

    Joined:
    Jul 24, 2009
    Messages:
    4,642
    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:
    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:
    551
    Agh, you caught it :p