• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Is it possible to make an item that increases HP or MP procentually?

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
If there is no such thing in the Object Editor, you can make 2 triggers. 1 trigger will set the Unit property Life to x% when picked up, and the 2nd will cause the Unit property Life to 100% when dropped.

Avoid periodic Events in this trigger, or the health will increase/decrease every time the periodic Event starts again.
There might be a problem with other life increasing stuff, since It might be possible that the life increase by levels, other items, abilities or anything else will not be changed by this percentage, and is just added as usual to the changed value. If this is the case, then don't use this suggestion or try to fix that, or else when players find out, they can use that bug to give themselves infinite max life by picking up and dropping a percentage and a life adjusting item.
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
you could make like 200 tomes with different HP bonuses, and use a dummy item. then save the max life of the unit in a variable and give the tome which has the closest bonus to the percentage you like to the unit. or did you mean which can be droped again? that would be more complicated then
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
SetUnitMaximumState. I do believe EF put in a vJASS implementation here; the original was discovered and made by blade.dk, if I remember correctly.

Just make sure that you reduce health by a the same amount that you added, rather than a % of health at the time the item is dropped. Possibly have a system where by the health is updated every second or something.
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
Yea, but the problem is that the campaign cannot use vJASS. And I just have basic world editor. So is this possible with JASS or GUI?

I will perhaps request a system...

First, you CAN use vJASS with campaigns, just need a bit of a work around.

Second, go find Blade or whoever's implementation in normal JASS.

Third, learn to JASS or get a JASSer. You can't really expect to make a campaign with stuff like this without one.
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
Captain Griffen said:
First, you CAN use vJASS with campaigns, just need a bit of a work around.
Perhaps, but I'm afraid I'm a guy who makes everything with GUI. :p

Captain Griffen said:
Third, learn to JASS or get a JASSer. You can't really expect to make a campaign with stuff like this without one.
Really...? I think I'm currently making pretty good campaign without any skills of JASS or vJASS. But hey, I have lot of great friends who help me if I want specific kind of triggers. :p
 
Level 12
Joined
Mar 16, 2006
Messages
992
I don't know what PROCENTUALLY means, but if you mean to say percent, then you could GUI it the old fashioned way using a buttload of HP bonus items, as well as scripts to detect max health and then give a corresponding HP bonus to them.

Easily MUI-able, just a lot of work.
 
Level 15
Joined
Dec 18, 2007
Messages
1,098
I don't understand what you mean, are you trying to get the max health of a unit to increase proportionate to the max health of the unit or something?
If so, I believe you will need JASS to make a proper system, otherwise, you can create a tome which increase health by 1 and give (Max Health of Unit x Whatever) tomes to the units. I know it lags like hell though.
 
Status
Not open for further replies.
Top