• 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!

Scaling Trigger

Status
Not open for further replies.
Level 2
Joined
Aug 9, 2012
Messages
19
I need a trigger that scales the ability Avatar, only the max HP and Armor parts (the damage increase part would be helpful too but I don't entirely need it), by a percentage of the casters strength. Also if you could explain what you did in the trigger so i can get a better understanding on how triggers work, thank you.
 
Thank you for the quick reply, but the guide doesn't exactly answer my question, because i cant find anything in the triggers that effects max hp and armor. Besides that I think the guide might help with my problem.
 
Creating an ability that increases armor by str% would need some math, abilities and variables

You can try to use maybe a devotion aura with 10 levels (10% each) and set lvl of the ability based on the % of str.

To affect max hp you can use triggers indeed, or abilities with hp bonus.
 
Have any idea on how to like set that up as a trigger, (because I don't understand variables all that much) which is why I asked if you could explain what you did so I can get a better understanding.
 
Lets say you create this devotion aura with 11 levels to give bonus armor

Lvl 1: 0 bonus
Lvl 2: 10% bonus
Lvl 3: 20% bonus
...
Lvl 11: 100% bonus armor.

Now, lets assume your Avatar increases armor by 10% of hero str by level, and has 4 levels, and the hero has 98 str. It would increase armor by 10%, 20%, 30%, and 40% of Hero strength

98*10% = 9,8% armor increase
98*20% = 19,6% armor increase
98*30% = 29,4% armor increase
98*40% = 39,2% armor increase

When your unit casts the ability, you have to set the ArmorAura ability to it's corresponding %. I'll assume that the ability level is 4, so it increases amor by 40%.

Set ABILITY = Ability Being Cast (Avatar)
Set ABILITYLEVEL = Level of ABILITY (4)
Set UNIT = Triggering Unit (The Hero)
Set STR = Hero Strength of UNIT (98)
Set REAL = (ABILITYLEVEL / 10) * STR = (4/10) * 98 = 39,2.

It should increase armor by 39,2 but it will round to 40, making the DevotionAura level to 5 (because lvl 1 gives 0)

Now conver REAL to Integer and it will be 39 (I think). Now add 10. It will be 49. Now divide it by 10, it will be 4,9, wich is 4 or 5 (i'm not sure if REAL to Integer conversion rounds up or down). Now set level of DevotionAura to the Now proceesed REAL, which is 5, which gives 40% armor. You can then start a timer and set the ability back to level 1 when it expires.

It's not really polished, I'd prefer you to learn a bit about Wc3 coding logic and some math rather than doing this for you. It's always better to learn how to fish, than to fish to feed someone else every day.
 
lol thanks guys, again I would like to learn all this, however idk where to start. But you all answered my question so you don't have to worry about it.
 
Status
Not open for further replies.
Back
Top