Okay so after hours of trying and searching all the forums I managed to get it done.
It uses a behavior inherited by a unit, let's call it AttackDamage.
Furthermore you will need to duplicate the damage effect used by your ability to set its value back if you drop your weapon, let's call them CutDamage and CutDamage2.
And of course you need a a Button too for the tooltip, where we will use an expression with four different text:
A: Your hero cuts the enemy, dealing <d ref="Effect,CutDamage,Amount-
B: (String(AttackDamageScaled) with 0 decimal places)
C: "/><c val="FF8000">(+
B: (String(AttackDamageScaled) with 0 decimal places)
D: ) </c>physical damage.
So why did we took it apart, instead of using one string?
The answer is simple, because of the equation.
At the end of A you can see a - mark which is followed by a linked Local Variable what we converted to String from Real.
The trigger looks like this:
- Events:
Unit - Any Unit attribute points changed
- Local Variables:
AttackDamageStackCount = (Stack Count of AttackDamage on (Triggering Unit)) <Real>
AttackDamageScaled = 0.0<Real>
- Conditions:
(Triggering behavior) == AttackDamage
- Actions:
If: (Unit type of (Triggering Unit)) == (your unit type of unit)
Then:
If: AttackDamageStackCount > 0.0
Then:
Catalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (Value of Effects CutDamage2 (Damage CEffectDamage) Amount for player (Triggering player))
Variable - Modify AttackDamageStackCount: * 1.5 (can be changed to whatever value you want it to be)
Variable - Set AttackDamageScaled = AttackDamageStackCount
Variable - Modify AttackDamageStackCount: + (Value of Effects CutDamage Amount for player (Triggering player) as an integer)
Catalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (String(AttackDamageStackCount) with 0 decimal places)
Catalog - Set value of Button,(your ability button here),Tooltip for player (Triggering player) to {~A~~B~~C~~B~~D~}
Else:
Catalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (Value of Effects CutDamage2 Amount for player (Triggering player))
Catalog - Set value of Button,(your ability button here),Tooltip for player (Triggering player) to "Your hero cuts the enemy, dealing <d ref="Effect,CutDamage,Amount"/><c val="FF8000">(+)</c> damage."
It will look something like this if you dont have any weapon equipped:
And this if you have a weapon:
You can copy&paste this code in your editor for other abilities or heroes, you just need to change the Unit, Effects,Button, it's tooltip and the multiplier of course.
Please note that if anything changes your behavior stack count besides your weapons, it will change the damage of your ability too.
I want to create a dynamic button tooltip for a damage type spell what deals
xxx+(BehaviorStackPoints*xx) damage.
The behavior itself doesn't do a thing, I only use it for it's stacks, also the behaviors stack count changes if the player gains a level, or equips a weapon.
Now, how can I set the spells button tooltip to a dynamic teyt, what changes when the behavior changes.
I managed to refer to the behaviors minimum point, but I want to refer to the current point.
So I want to make it like when you buy a weapon in LoL and your spells button tooltip changes.
I've seen something similar in the "Boss Testing" arcade game too.
If someone could help me, I would really appreciate it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Okay so after hours of trying and searching all the forums I managed to get it done.
It uses a behavior inherited by a unit, let's call it AttackDamage.
Furthermore you will need to duplicate the damage effect used by your ability to set its value back if you drop your weapon, let's call them CutDamage and CutDamage2.
And of course you need a a Button too for the tooltip, where we will use an expression with four different text:
So why did we took it apart, instead of using one string?
The answer is simple, because of the equation.
At the end of A you can see a - mark which is followed by a linked Local Variable what we converted to String from Real.
The trigger looks like this:
- Events: Unit - Any Unit attribute points changed
- Local Variables:
AttackDamageStackCount = (Stack Count of AttackDamage on (Triggering Unit)) <Real>
AttackDamageScaled = 0.0<Real>
- Conditions: (Triggering behavior) == AttackDamage
- Actions:
If: (Unit type of (Triggering Unit)) == (your unit type of unit)
Then:
If: AttackDamageStackCount > 0.0
Then:
Catalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (Value of Effects CutDamage2 (Damage CEffectDamage) Amount for player (Triggering player))
Variable - Modify AttackDamageStackCount: * 1.5 (can be changed to whatever value you want it to be)
Variable - Set AttackDamageScaled = AttackDamageStackCount
Variable - Modify AttackDamageStackCount: + (Value of Effects CutDamage Amount for player (Triggering player) as an integer)
Catalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (String(AttackDamageStackCount) with 0 decimal places)
Catalog - Set value of Button,(your ability button here),Tooltip for player (Triggering player) to {~A~~B~~C~~B~~D~}
Else:
Catalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (Value of Effects CutDamage2 Amount for player (Triggering player))
Catalog - Set value of Button,(your ability button here),Tooltip for player (Triggering player) to "Your hero cuts the enemy, dealing <d ref="Effect,CutDamage,Amount"/><c val="FF8000">(+)</c> damage."
It will look something like this if you dont have any weapon equipped:
And this if you have a weapon:
You can copy&paste this code in your editor for other abilities or heroes, you just need to change the Unit, Effects,Button, it's tooltip and the multiplier of course.
Please note that if anything changes your behavior stack count besides your weapons, it will change the damage of your ability too.
PS: Sorry for my English.
Could someone send me a map with the trigger? I just can't get it to work. :D I've no idea what I'm doing wrong.
Hmmm..... Could you link me a tutorial for this, or could you make an example?
I'm just not good at U.I. editing as it seems.
Hello!
I want to create a dynamic button tooltip for a damage type spell what deals xxx+(BehaviorStackPoints*xx) damage. The behavior itself doesn't do a thing, I only use it for it's stacks, also the behaviors stack count changes if the player gains a level, or equips a weapon. Now, how can I set the spells button tooltip to a dynamic teyt, what changes when the behavior changes.
I managed to refer to the behaviors minimum point, but I want to refer to the current point.
Here is the current tooltip:
"Deals <d ref="Effect,TestEffectDamage,Amount"/><c val="FF8000">(+<d ref="Behavior,TestBehavior,MinPoints*0.1"/>) </c>damage."
So I want to make it like when you buy a weapon in LoL and your spells button tooltip changes. I've seen something similar in the "Boss Testing" arcade game too.
If someone could help me, I would really appreciate it.