• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Set max life

Status
Not open for further replies.
Level 5
Joined
Oct 17, 2006
Messages
151
In GUI I no nothing of which that can do this... However, cant you just replace the unit with a new unit that just has a higher max life? Or is this max life based upon many different aspects of the game?
 
Level 6
Joined
Jul 25, 2005
Messages
221
There is an action known as Unit - Set Max life of Unit, but that will not have the desired effect you're looking for. Instead, find the Item Ability that gives life +, can't remember what it's called but I think it's something in the lines of Item Ability Life +. Adding this to your unit will increase its max hp. Simply use Unit - Add Ability to Unit, and then remove the ability if you don't want him to have the bonus life.
 
Level 5
Joined
Oct 17, 2006
Messages
151
You talkin bout these 2?
  • Destructible - Set max life of (Last created destructible) to 100.00
  • Unit - Set life of (Triggering unit) to (Life of (Triggering unit))
=P

Huzzah!!! I have not thought of abilities... :thumbs_up:
 
Level 7
Joined
Jan 18, 2007
Messages
180
Thanks for the suggestions, guys. But the problem with the item abilities thing is that I have a trigger like this:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -number as A substring
    • Conditions
    • Actions
      • Set YourInteger = (Integer((Substring((Entered chat string), 9, 12))))
      • Unit - Set life of Footman 0000 <gen> to (Real(YourInteger))
The trigger is supposed to set the life of the footman to whatever integer you type, (The problem is the last action) so I can't use item abilities. I've seen this done in a DnD map, so I know it's possible.

Hope I'm clear enough.
 
Status
Not open for further replies.
Top