• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Passive Spell

Status
Not open for further replies.
Level 6
Joined
Sep 19, 2007
Messages
215
Well ive been trying this spell for awhile but i just cant figure it out how to increase armor on hero by % of attribute or health, or something like that.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
To increase max hp of a unit, you must add an item ability to it that has a negative hp modifier. When the ability is removed, the unit gains max hp. Vice versa for reducing max hp. Use positive values for that.

Then create copies of both abilities.

Ability 1 has -1 hp
ability 2 has -2 hp
.. -4, -8, -16 , -32 , -64 , -128 , -256 , -512 , -1024...

Then you calculate the % increase. After that, run the health increase number through a loop that first finds the highest hp gain amount that is lower than the hp amount that should be added. Add and remove the ability from the unit. Reduce the health increase number. Then check whether you still need to add hp.

For example if a unit has 1000 health, and the bonus is 50%. The unit should gain 500 hp. Loop through the abilities and you'll find that the first bonus that is lower than 500 is 256. Add/remove the 256 ability for the unit. Then 500-256=244 of health that's still missing. 128 is the next value to be added/remove since it's lower than 244. Then 244-128 =116. 116-64=52. 52-32=20. 20-16=4. 4-4=0.

So you have to add/remove the following abilities:
256, 128, 64, 32 , 16 , 4.
After that you have gained 500 hp. When you want to remove the bonus, add positive value abilities and remove them.

Health is in reals so you may end up with a value of 1>x>0. Ignore that.

There's a system for this in the spell section I believe.

For armor, devotion aura has data field "percent bonus". Set it to true. Maybe you can use that.
 
Level 6
Joined
Sep 19, 2007
Messages
215
No im using windows, and its not what i was asking, i cant find the trigger at all to set the amount of armor by % or anything ive tried looking in everything but i just cant seem to find it unless im super blind
 
Level 6
Joined
Sep 19, 2007
Messages
215
Bump, Please someone help this is the only thing stoping me from going farther in my map so far. i cant figure out how to make the trigger give hero Armor bonus from max health by 6%
 
Status
Not open for further replies.
Top