• 🏆 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!

[Trigger] how could I possibly increase the "max life" of a unit with trigger?

Status
Not open for further replies.
Level 5
Joined
Jan 27, 2007
Messages
154
.. or it needs... JASS or some custom scripts?

and another thing.. is there anyway to increase armor by trigger without any other factor like upgrades or etc??
 
Max life cannot be increased like "zip" with trigger actions. Jass has some extra functionality over GUI, but it doesn't make miracles. It's another version of GUI i'd say, so, it's almost the same. You will need an ability e.g. Item Life Bonus (Greater) to manually add it by triggers: Unit - Add Ability to (your unit).
Armor will be the same. Unit - Add Ring of Protection to (Your unit)
Example for Set Max hp: http://www.thehelper.net/forums/showthread.php?t=81466
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
Copy and paste the abilities: "life bonus" of the health amulett and the "armor bonus" of the ring of protection.

Give it as many levels as you want. (e.g. 1 = 100 bonus hp, 2 = 200....)

Then use the trigger action:

Unit - add ability
and
Unit - set level of ability for unit

To get the needed hp bonus :D
 
Level 5
Joined
Jan 27, 2007
Messages
154
This is weird.. I know I've done whats right... The level is not increasing but the skill is present... I have no Idea why it's not working..

  • Events
    • Player - Player 1 (Red) types a chat message containing end as An exact match
    • Player - Player 2 (Blue) types a chat message containing end as An exact match
    • Player - Player 3 (Teal) types a chat message containing end as An exact match
    • Player - Player 4 (Purple) types a chat message containing end as An exact match
    • Player - Player 5 (Yellow) types a chat message containing end as An exact match
    • Player - Player 6 (Orange) types a chat message containing end as An exact match
    • Player - Player 7 (Green) types a chat message containing end as An exact match
    • Player - Player 8 (Pink) types a chat message containing end as An exact match
    • Player - Player 9 (Gray) types a chat message containing end as An exact match
    • Player - Player 10 (Light Blue) types a chat message containing end as An exact match
    • Actions
      • Item - Set charges remaining in (Item carried by hero[(Player number of (Triggering player))] of type |c0000FF00Endurance|r) to ((Charges remaining in (Item carried by hero[1] of type |c0000FF00Endurance|r)) + 5)
  • Unit - Set level of Item Life Bonus (least) for hero[(Player number of (Triggering player))] to (Charges remaining in (Item carried by hero[(Player number of (Triggering player))] of type |c0000FF00Endurance|r))
Im 100% sure of everything including the skill... The item quantity increases so I'm also sure there's nothing wrong with the trigger...
 
Level 3
Joined
Sep 11, 2004
Messages
63
hero[1] should be hero[(Player number of (Triggering player))] in this line:

Item - Set charges remaining in (Item carried by hero[(Player number of (Triggering player))] of type |c0000FF00Endurance|r) to ((Charges remaining in (Item carried by hero[1] of type |c0000FF00Endurance|r)) + 5)
 
Level 6
Joined
Jun 14, 2008
Messages
176
Item health bonus would not show an icon I assume, since most item-only abilities(mana regeneration, HP boost, MP boost, etc) do not have any icons when given directly to a unit.

But if it did, you could just put it in a disable spellbook to hide it.

And if you wanted an icon, simply just use a dummy ability(evasion with 0% chance to evade for example) and use a trigger to add it along with the HP boost ability.
 
Maybe this Item is tricky, like Gloves of Haste. As "Item Damage Bonus" increases normally its level (even if it is considered as an ability out of an item), Gloves of Haste should also increase its level; but it doesn't. To override that issue, simply place this ability in a spell book ability, add the spellbook to your hero and then use this trigger:
  • Melee Initialization
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Player - Disable (your spellbook) for (Player(IntegerA))
Then, even if you disabled the spellbook and use the action "Unit - Increase/ Set level of Ability for Unit", the level will still increase. Since Item Life Bonus seems to have the same attitude as Gloves of Haste, don't hesitate to try.
 
Level 5
Joined
Jan 27, 2007
Messages
154
Or you can use item ability called "Item Life Bonus"

Edit:Wops, didnt read post #4

BTW, that's exactly what I did...

I'm fully aware that item skills dont show up but still consume a space in icon and the items are tricky.. but I'm sure as in 100% that it is the ability, I just restored it's real name...

BTw, thank you all for your suggestions.. Ill try it all out..
 
Level 5
Joined
Jan 27, 2007
Messages
154
I dont need to revert it back actually... the End trigger there (stands for endurance) is actually a part of psuedo-stats ill be using for the map...

This is the map..... Please try if the trigger works for you, I'm 99% sure that this logically speaking, should work.
 

Attachments

  • dada.w3x
    22.2 KB · Views: 84
Status
Not open for further replies.
Top