Unit Max Health

Knights

You can change this now in User CP.
Reaction score
71
Is there a function to set a units max health using triggers?

I want to have a fourth attribute called Stamina and this stamina should control the units health, instead of strength. Is there any way I can do this with triggers or even any other method?

Thanks,
Knights
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, there is no simple function for it, but I'd recommend that you use a system for it, and then some Jass to do it ;)

This is a very good one for what you're trying to do.

Just import that code into your map (Follow the instructions thoroughly) and then use this to add max health to a unit:
Trigger:
  • Custom script: call Status[ GetTriggerUnit() ].modHealth( 100. )


Which will give 100 extra life to the triggering unit ;)
 

Knights

You can change this now in User CP.
Reaction score
71
Thanks that looks like a great system, I'll look into it.
 

Bogrim

y hello thar
Reaction score
154
There's an alternative method than the system Komaqtion linked, which you can see a good explanation of here. Basically, you add the item life bonus ability to a unit, increase it by a level and then remove it again. If the second rank is -240, the unit will gain 240 hit points.
 
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