What kind of button? If it's a Dialog Item, then you would use the Set Dialog Item Value trigger, with the value being a function Concatenate Strings, the first string is "Count of weapon upgrade:" or whatever and the second string being Convert Integer To String function, where the integer is Upgrade Count for Player (function name might be slightly different)
Edit: Nvm I thought you meant a dialog item button.
I'm pretty sure data buttons can't have a text value on them except for the hotkey. Are you asking how to make the button's tooltip display the upgrade count?
If you want text on the actual button one way would be to overlay a transparent dialog item on top of the button and put the upgrade count in that.
Does anyone know how to show the upgrade count in a button?
Like , Count of weapon upgrade: Y(count of the upgrade)
Basically, you can't, at least not directly. Is a trick for this though, just make a dummy effect, like a Damage effect named Weapon Upgrade Damage, with a damage amount that starts at 0, and increases by 1 every time the appropriate upgrade increases. Then you just reference Weapon Upgrade Damage's damage amount in your button tooltip, no silly triggering needed.
@Deadzergling: Go I think he means in the button itself, not in the tooltip.
Well, in fact, as it can be set up to have charges, but use 0 charges, you can make the upgrade itself set a new value for the amount of charges. I never tested it and I don't know if there are possible bugs or holes in this theory so if someone has tested it please let me know. If not, triggers will fix it for sure.
Does anyone know how to show the upgrade count in a button?
Like , Count of weapon upgrade: Y(count of the upgrade)
What kind of button? If it's a Dialog Item, then you would use the Set Dialog Item Value trigger, with the value being a function Concatenate Strings, the first string is "Count of weapon upgrade:" or whatever and the second string being Convert Integer To String function, where the integer is Upgrade Count for Player (function name might be slightly different)
It s just a regular data button, like the ones in command cards
bump :(
Edit: Nvm I thought you meant a dialog item button.
I'm pretty sure data buttons can't have a text value on them except for the hotkey. Are you asking how to make the button's tooltip display the upgrade count?
If you want text on the actual button one way would be to overlay a transparent dialog item on top of the button and put the upgrade count in that.
Command card buttons display the amount of charges.
which can display upgrade count if you set it by triggers:D
@robin374: Go
Basically, you can't, at least not directly. Is a trick for this though, just make a dummy effect, like a Damage effect named Weapon Upgrade Damage, with a damage amount that starts at 0, and increases by 1 every time the appropriate upgrade increases. Then you just reference Weapon Upgrade Damage's damage amount in your button tooltip, no silly triggering needed.
@Deadzergling: Go I think he means in the button itself, not in the tooltip.
Well, in fact, as it can be set up to have charges, but use 0 charges, you can make the upgrade itself set a new value for the amount of charges. I never tested it and I don't know if there are possible bugs or holes in this theory so if someone has tested it please let me know. If not, triggers will fix it for sure.
@Deadzergling: Go That could work! I'll try it when I have time.
@SoulFilcher: Go I meant in the tooltip, sorry if I was unclear, I was in a rush while creating this topic