Starcraft 2 editor dynamic text variable
![starcraft 2 editor dynamic text variable starcraft 2 editor dynamic text variable](https://bnetcmsus-a.akamaihd.net/cms/page_media/9GHNCOPY3IYU1593119347652.png)
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. The button tooltip will look something like this if you dont have any weapon equipped: The trigger will look something like this: Variable - Modify AttackDamageStackCount: + (Value of Effects CutDamage Amount for player (Triggering player) as an integer)Ĭatalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (String(AttackDamageStackCount) with 0 decimal places)Ĭatalog - Set value of Button,(your ability button here),Tooltip for player (Triggering player) to Ĭatalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (Value of Effects CutDamage2 Amount for player (Triggering player))Ĭatalog - Set value of Button,(your ability button here),Tooltip for player (Triggering player) to "Your hero cuts the enemy, dealing (+) damage." Variable - Set AttackDamageScaled = AttackDamageStackCount Variable - Modify AttackDamageStackCount: * 1.5 (can be changed to whatever value you want it to be) If: (Unit type of (Triggering Unit)) = (your unit type of unit)Ĭatalog - Set value of Effect,CutDamage,Amount for player (Triggering player) to (Value of Effects CutDamage2 (Damage CEffectDamage) Amount for player (Triggering player)) The answer is simple, because of the equation.Īt the end of A you can see a - mark which is followed by a linked Local Variable what we converted to String from Real.ĪttackDamageStackCount = (Stack Count of AttackDamage on (Triggering Unit)) So why did we took it apart, instead of using one string? B: (String(AttackDamageScaled) with 0 decimal places).A: Your hero cuts the enemy, dealing (+.Let's call them CutDamage and CutDamage2.Īnd of course you need a Button too for the tooltip, where we will use an expression with four different text: Let's call it AttackDamage.įurthermore, you will need to duplicate the damage effect used by your ability, to set it's value back, if you drop your weapon. The trigger uses a behavior, inherited by a unit. Maybe it's not the best, but hey it works.īefore we start we need some things first to get the trigger to work.
![starcraft 2 editor dynamic text variable starcraft 2 editor dynamic text variable](https://s2editor-guides.readthedocs.io/New_Tutorials/07_Lessons/resources/081_Display_a_Variable_to_the_Screen4.png)
I had issues with Button Tooltips for a long time,īecause I wanted attribute scaled, ability damage effects and I just couldn't get it done.īut finally I found a solution to get it to work.