Creating an item that grants temporary extra hit points...

Diamondeye

New Member
Reaction score
10
Is it possible (I guess it is)? More importantly, how to do it? There is no item nor unit or hero ability that does this (I think. Would it be too hard configuring Avatar, and would it work)?

Anyway, even if Avatar works, is there a way to do this stackable?

Say, I want to create an item that grants 100 extra hp for one minute when used, and can stack. What to do? Could you add it by using triggers along with an upgrade? A skill with levels (and would the upgrade/skill need to show up in the hex?)?

Please, any advice/help is greatly appreciated.
 

Azlier

Old World Ghost
Reaction score
461
EDIT: Oh, just realized you want it to be for a certain time... in that case, you need to use something like Avatar since upgrades are permanent.
 

Fluffball

Well-Known Member
Reaction score
35
Maybe using triggers, Set Max Life = Current Max Life + 100, wait 60 seconds, minus 100
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I started to attempt something here, hope it helps!
NOTE: XXXXX = the units name.
[EDIT]: Change "YYYYY" to name of item.

Code:
MOAR HP
    Events
        Unit - XXXXX <gen> Uses an item
    Conditions
        (Picked item) Equal to (Item carried by XXXXX <gen> of type YYYYY)
    Actions
        Countdown Timer - Start (Expiring timer) as a One-shot timer that will expire in 60.00 seconds
        Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + 100.00)
 

Azlier

Old World Ghost
Reaction score
461
But when the timer expires and you're supposed to set the HP back to normal... you cannot get a triggering unit. If you store the unit in a variable, it won't be MUI.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
That's why I said it's an attempt :p
I couldn't find where to say
'When Timer expires, Set life of triggering unit to life of triggering unit - 100.'
Eh.
 

Samael88

Evil always finds a way
Reaction score
181
That's why I said it's an attempt :p
I couldn't find where to say
'When Timer expires, Set life of triggering unit to life of triggering unit - 100.'
Eh.

If there is such a thing then it gotta be just changing the + there to a - instead, else if it is called add life, then you are looking for remove life.

And also, won't that function only change the current life and not the max?

As I recall what you want is not achievable thru trigger either, but my memory has not been the best lately:rolleyes:
 

WolfieeifloW

WEHZ Helper
Reaction score
372
If there is such a thing then it gotta be just changing the + there to a - instead, else if it is called add life, then you are looking for remove life.

And also, won't that function only change the current life and not the max?

As I recall what you want is not achievable thru trigger either, but my memory has not been the best lately:rolleyes:
Yeah, I think that does only increase current life :p .
It was just something quick to get him at least started, if he even looked at it :shades: .
 

FireBladesX

Eating my wings!
Reaction score
123
Although there is no simple function to change a unit's maximum hit points, there is a system by Tom Jones found Here. It's quite useful, I've used it and it works well. Slightly annoying to implement.
 

CysticCraze

New Member
Reaction score
12
Idk seems logical to create a timer thats say, instantaniesly increases health by say 100, than you make a timer to -1000health on a 60 second timer. Or is the problem here with the -health aspect?
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
i dont know this for sure but a pro map maker told me that you can't GUI trigger a unit's max life, and in wolf's trigger it won't work if they're already at full hp
life
100/100
life + 100
100/100
 

FireBladesX

Eating my wings!
Reaction score
123
Although there is no simple function to change a unit's maximum hit points, there is a system by Tom Jones found Here. It's quite useful, I've used it and it works well. Slightly annoying to implement.

Maybe I wasn't clear in my wording. What I meant to say is that, while you can't easily manipulate a unit's maximum hit points in GUI, methods exist.

This link is one of them.

Same link as above, anyways.
 

Diamondeye

New Member
Reaction score
10
Thanks a bunch, FireBlades, but that method looks way too complicated to me. I'll give it a try with Avatar and see if I can make it work. Thanks again everyone!
 

Faust

You can change this now in User CP.
Reaction score
123
Why don't you just give the periapt or wtf of life or health or I don't know to it, and remove it later?
 

Diamondeye

New Member
Reaction score
10
Why don't you just give the periapt or wtf of life or health or I don't know to it, and remove it later?

Good idea except those are permanent and there is no way to refer to the unit later on.

I already tried forcing a duration onto a Manual Of Health, but to no use... I'll try to use a 60sec buff and see if I can find a way to reduce the health when the buff fades, should be possible, although it wouldn't stack, so perhaps using avatar is just as good...
 

Faust

You can change this now in User CP.
Reaction score
123
Just start a timer in vJASS, use a simple struct. Make it MUI.
And you can check if a unit has it, by checking if it has an ability with level > 0
And, unless I'm mistaken, they stack, and if you have 2, and you remove it once, only one gets removed, so, flawless victory.
But maybe not.
 

Diamondeye

New Member
Reaction score
10
Okay I tried giving the item the avatar ability, I modified it as follows:

Art - Button position (X, Y, Learn X, Learn Y) -->0
Art - Icon (normal + turn off) -->Soul Gem
Data - Damage bonus -->3
Data - Armor bonus -->1
Data Hit Points bonus -->200
Stats - Area of Effect -->0
Stats - Bufs -->Oversoul (custom buff, over Avatar)
Stats - Casting Time -->1
Stats - Cooldown -->120
Stats - Hero ability -->False
Stats - Item ability -->True
Stats - Mana Cost -->0
Stats - Targets Allowed -->Self
Text - Hotkey (Normal and Learn) -->Blank
Text - Name -->Oversoul

However I get to CTD and get this message:
errorwar3.jpg


... I think it warns me not to divide by zero or summat, can anyone helpmeh?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top