• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Strength converted to armour.

Status
Not open for further replies.
Level 24
Joined
Jul 9, 2009
Messages
4,097
Hello I have a problem I want to make a passive ability for my hero so that 10% of its strength becomes armour. (So if he has 20 strength he'll gain 2 armour.) And I want this permanent ability to constantly update so say the hero gain strength from leveling up or gaining item bonuses I want the amount of armor to increase.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Armor can't be modified with triggers. Just with abilities. You would have to create an ability wich gives armor and make it add 0.2 per level. And periodically set level of the ability = strength.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
If you don't use Agility for Speed or Attack damage, you could manipulate agility to handle the armor. (I never tough about this... seems like an amazing solution).
 
Level 24
Joined
Jul 9, 2009
Messages
4,097
Well sadly I wanted strenth to give armour since strength is the heroes main ability and he's a tank I will have to think of another way to solve the armour problem.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,208
Make trigger with event is "Evry 1 second of game time"
Stupid idea as it creates unnescescary script overhead.

Rather only update it on events that change the heroe's strength.

Assuming the item ability level bug does not work with armor item abilities...

You need to make many different armor abilities that are powers of two. To support +127 to -128 units of armor that would need 8 abilities. You then add and remove the abilities as appropiate in a similar way to the binary number for the number of units you want to add to the unit above its base.

As the unit size is 0.2, 8 abilities will give you about +/- 25 armor. As you will only be adding armor in this case you can forgo the negative armor (unsigned) and thus have a range of 51 armor. Coincidentally that would give you support for up to 255 strength. More abilities could be used, such as 16, for larger ranges.
 
Status
Not open for further replies.
Top