• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] How do you edit a unit's hitpoints and base damage in game?

Status
Not open for further replies.
Level 6
Joined
Oct 23, 2006
Messages
223
Ive been mapping for over 4 years and still dunno how to do this. Ive done this in the past by using other ways but generally i need a more effective way to do this. Im making a spell that a summoned unit's hp and damage is based off a hero's int.
 
Hmm you could to an Techtype for the Summoned Unit which will be the same as the Int. But there is an max Level of 50 tought, and you'll need one Techtree for each Player, plus you can't lower the Techlevel.

Then just set an Trigger which Fires when the Spell is cast, and set the Tech to the suggested level. Maybe you could do at level increase for each 4int the Hero has..
 
paskovich since i know nothing on jass and planning to make a totally cool map w/o the help of jass, i guess i better break dat rule. Anyways i've figured out how to do the damage w/o abilities/items/upgrades/jass :) tnx for the hp thing...ill figure it out sometym hahaha
 
What I would do would simply give the unit an ability that increase the maximum of hit point:
Item Life Bonus (Greater)
Converted into an unit ability with your Hit Point modification value. You won't see the icon so it will be ok. And for the damage, add the ability:
Item Attack Bonus (+X)
It don't matter the number as you will modify it to the valu you want.

That is what I would do... You could remove the hit point max and the damage increasement at any time...
 
i used custom ability variable in each to store a hero's stat and use triggers to deal that much damage each time the unit attacks....for the life bonus thing with abilities, i used the item ability life bonus and it dosent seem to work for normal non-hero units...why is dat?
 
i used custom ability variable in each to store a hero's stat and use triggers to deal that much damage each time the unit attacks....

Lame way! That trigger fires when the unit'a attack animation starts, and not when the Attacked Unit is damaged. It will even deal bonus damage when the attacker misses...

The only lame way is one that doesn't work. And while I agree that this is probably not the best way and that this method can cause problems, a simple wait function can fix many of the problems.
 
Status
Not open for further replies.
Back
Top