• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Adding to units Max Life

Status
Not open for further replies.
Level 5
Joined
Aug 8, 2007
Messages
112
How would I add to a unit/heroes max life (max amount of HP a unit can heal up to/have)?

Would this change its max life or would it just add to the HP lost:

  • BloodStalk
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Blood Stalk ) Equal to True
    • Actions
      • Set U_BloodStalker = (Attacking unit)
      • Unit - Set life of U_BloodStalker to ((Max life of U_BloodStalker) + 5.00)
This is an ability where if the unit kills, it gains max life of 5HP.
Is this right or how must it be done?

Thank you!
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
2 ways - Give him life increasing ability (that pendant of vitality uses)
or there should be a max hp changer system in wc3jass.com
 
2 ways - Give him life increasing ability (that pendant of vitality uses)
or there should be a max hp changer system in wc3jass.com
3 ways
If it's a hero give him a "health tome" item(? the book with panda on cover) with modified ability to +5 hp each time your hero kill an enemy units.Or if it's a unit give him inventory ability....
 
Level 8
Joined
Feb 20, 2007
Messages
338
  • More HP
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Killing unit) Equal to Hero
    • Actions
      • Item - Create Manual of Health at (Position of Hero)
      • Hero - Order Hero to use (Last created item)
Is the trigger. In this case Hero is a variable (unit variable) you can make it what ever you want.

Manual of Health is a custom (copy_ item you will have to make. Actually you will have to customize two things - assuming you are using the default manual of health elsewhere in your game.

The Default HP gain of the Manual of Health is 50 HP - you will have to go to the item editor. I would suggest copying and pasting the manual health making a custom version, and you will have to make a custom Item Ability. The title is: Item Permanent Life Gain +50.
Copy and paste that ability, change Data - Max life gained from 50 to 5

Why create and use - because giving a manual does not cause the hero/unit to use it all the time. I have used variations of:
  • Hero - Create Manual of Health and give it to (Triggering unit)
And the hero unit has walked on leaving behind the tome. I have found that create and use is always successful at giving the unit the power up.

As pointed out you will need to give the inventory ability to a non-hero unit. I would suggest making a copy of that and removing its techtree requirement (Backpack Human - learned via halls). Unless you still want it to be a learn able ability.

Why copies? I have discovered that as I progress on making maps that I get ideas later into the map and often use the default unit/item/ability for other things.

In this case, you may desire to have your hero get more HP the higher level s/he is, this way you can make several customized Manuals of Health, one that gives 5 Hp, one that gives 10, one that gives 25 and one that gives 50.

Mind you can use other power ups, intelligence, Strength and Agility along with experience (level up) in a similar manner.
 
Status
Not open for further replies.
Top