Tooltip - Getting the current level of ability inside a tooltip

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Take these two tooltips for example:

Learn Sniper (button, learn-tooltip)
Sniper deals damage to weak units from a long distance.

Level 1: <d ref="Effect,SniperDamageLevel1,Amount"/> damage
Level 2: <d ref="Effect,SniperDamageLevel2,Amount"/> damage

Targets: non-hero, non-structure
Cooldown: none



Sniper (button, ability-tooltip)
Sniper deals <d ref="Ability, HeroSniper[GetCurrentLevel].Amount" /> damage.

Targets: non-hero, non-structure
Cooldown: none

Now, how would I reference the current level of the ability on the hero, to get the proper amount of damage to be displayed?

Having a strange feeling about this, since I've been playing arcade games, and most of the tooltips are on the format: Learning-Tooltip works properly, while the ability tooltip is just shortened to "Sniper deals huge damage".

I've researched and someone mentioned creating one button for each of your level, then trigger it to show which button shall be shown depending on level... Which I will not use my time on, so any other suggestions?

Edit: Hm, trying to change the tooltip on the ability itself, see if it overrides the button tooltip.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Solution:

Create tooltips on the buttons for level 1 of the ability.

For all subsequent levels of the ability:

Go to your ability
Command card: level Butotn - Tooltip
1. Add a value (the top will be for level 2)
2. Add a key like so: "Text\Button\<abilityName>"
3. Add the text: "Sniper deals <d ref="Ability, HeroSniper[1].Amount" /> damage."
4. Click OK
5. Repeat 1-4 till you are complete for all levels of the ability, make sure to change the index of the array, in my example above: "HeroSniper[<index>".

PS: Do note that the icons and name for the ability works the same way. Specify the icon, name and tooltip on the button. If you want a different name, icon or tooltip for the other levels (level >1) then do so on the ability.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top