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

[General] Modifying stats using other stats

Status
Not open for further replies.
Level 5
Joined
Dec 25, 2014
Messages
111
There's many natives that allow us to change more of unit's stat than before like, base attack, armor, etc. right now.
I'd like to figure out how to properly do it, for example there is one item in new Released game LoL Wild Rift that increases armor by percentage of the unit's mana.
Or maybe i want to increase unit's armor by Strength Attribute instead of Agility.
There are more possible example, but i can't figure it out the logic for the trigger/code.
I'm thinking about using BonusMod but i don't think it will answer my thought.
I'd like to a create a complex system for all of that but my skills are low.
Or is there already someone who figure it out how?
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
The function "Unit - Property" can be used to refer to a unit's current or maximum life/mana
  • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + ((Max mana of (Triggering unit)) x 0.02))
The function "Hero - Attribute" allows you to refer to a Hero's attribute, but note it is an integer and requires conversion to be used in a real.
  • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + ((Real((Strength of (Triggering unit) (Include bonuses)))) x 0.30))
A method for doing this would be to have an event fire if a hero picks up a particular item and add a periodic check to see if the unit is alive, if so, the armor is updated if it has changed since the last check.
But I do not know you're skill level so i'm also going to suggest a thumb through this tutorial.
 
Level 5
Joined
Dec 25, 2014
Messages
111
The function "Unit - Property" can be used to refer to a unit's current or maximum life/mana
  • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + ((Max mana of (Triggering unit)) x 0.02))
The function "Hero - Attribute" allows you to refer to a Hero's attribute, but note it is an integer and requires conversion to be used in a real.
  • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + ((Real((Strength of (Triggering unit) (Include bonuses)))) x 0.30))
Yes i already know and understand all of those.
But what i mean is something like, i want them stats got changed dynamically, something like an aura, not something like they gain from kills, level up, etc.
 
Status
Not open for further replies.
Top