• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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.
 
Level 6
Joined
Feb 2, 2005
Messages
205
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..
 
Level 6
Joined
Oct 23, 2006
Messages
223
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
 
Level 7
Joined
Jul 14, 2006
Messages
292
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...
 
Level 6
Joined
Oct 23, 2006
Messages
223
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?
 
Level 8
Joined
Sep 13, 2006
Messages
431
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.
Top