• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[HELP] Increase Max HP AoE

Status
Not open for further replies.
Level 11
Joined
Jun 30, 2008
Messages
580
  • 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
 
Level 11
Joined
Jun 30, 2008
Messages
580
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)
 
Level 3
Joined
Dec 17, 2010
Messages
45
+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.
 
Level 9
Joined
Aug 7, 2009
Messages
380
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?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
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)

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
 
Status
Not open for further replies.
Top