• 🏆 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] Need Help On Increase Max HP Skill

Status
Not open for further replies.
Level 5
Joined
Nov 14, 2007
Messages
161
So I'm trying to make an active ability that when cast for the first time, it sets the caster's max HP to 10% more then what it was and also heals for that amount of HP. The cooldown on this skill is shorter then it's duration so if it is cast while still in effect, I don't want an additional 10% HP but only the 10% heal. While i was working in the editor, it didn't want to let me. The closest I could get was:
  • Unit - Set life of (Triggering unit) to (100.00 + 10.00)%
which seems like it should work but it doesn't. I also need a way to convert his HP to what it would be without the buff going. Is there anyway to change max HP % easily? I think I can manage the % heal part if I can get it to change the life to that percent, and I believe I can check if the unit has the buff, then only do the HP % heal.

Any ideas are welcome for this skill.
YO_MA_MA
 
Level 5
Joined
Nov 14, 2007
Messages
161
If I were to learn enough jass to do this, would it be a % to max hp or would it be the same idea of increase by X amount HP? I really would like to do a percent if its possible, but a good old + HP would be fine too.... how would I add to HP using triggers if I chose this way?

Another idea that just came to me, I know I can check what 10% of his current hp is, is there a way to add that amount easily and just take it away or change it if/when he levels and his HP changes?

Thanks for the feed back, looking forward to more.
YO_MA_MA
 
Level 5
Joined
Nov 14, 2007
Messages
161
BUMP:cexc:
(Been 4 days and this topic is not on the first page anymore.)

Still wondering if I will have to learn JASS or if someone can help script a function for me to add at the top to call it would need to be able to be used by more then one player (MUI) while still having its effects. If it's to much trouble, let me know and I'll just change the skill to increase X HP on the unit. Thanks again.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
>.< Modify the book that gives 50 hp to give 1 hp
For each A integer from 0 to <The Hp you want to add>
-----loop actions
--------------Item - create item for hero -> Create book and give it to <the unit you want to modify hp>
 
Status
Not open for further replies.
Top