I have a targeted ability that deals damage and grants the caster a stack of a behavior if that damage kills the target. I would like to make it display the stack count of this behavior on the button, without having to create a dialog display for it.
In order to accomplish this I was going to try to use the ability's charge count to display this by adding and removing charges to match the number of stacks of the behavior. I figured that by giving the ability a Charge Count (Use) of 0, the ability could still be casted even if the stack count (and therefore charge count) were 0.
However, with a Charge Count (Use) of 0, there are some inexplicable issues. Even though I have a Charge Count (Start) of 0, the ability starts with the max number of charges, 5. Attempting to remove charges via trigger does nothing. Setting any value for Charge Time Start or Charge Time Use does nothing as well.
Does anybody know how to fix these issues and accomplish what I wanted?
i think you cannot use a charge count of 0. i would reference data of an dummy effect inside that button. then simply change the value of that dummy effect to match the number of charges (buffs) with catalogs
i'm lazy lately and don't want to make a sample map, but i think you can try to use COST LINK. You need another dummy ability or behaviour or weapon that will use this charges as it's cost, but is muted, then you will have to link that cost to your actual ability, but you shouldn't define cost in it (usualy if you want a proper link you must set cost and cooldown etc in both linked abilities but for this stuff leave it blank, just modify a cost link string value), so charges won't be needed to cast abil.
I'm not sure if this will work though..
EDIT: ok i quickchecked this and it seems link doesn't work without the actual cost values defined so nvm...
I say make the buff apply a dummy weapon and use charges on that to display the number of stacks using a counter system that compares buff stacks to charge counts. Use Unit Compare Charge Used and Unit Compare Behavior Count validators and a system like my choosable attribute system demo map.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
A dummy weapon wouldn't help because the map has a custom interface with no use of the original weapon display. Really needs to be on the ability button itself (or perhaps the buff bar).
it's possible to hook up buttons but dunno if it is possible to change the charge counter with that (was able to activate the autocast animation on inventory buttons)
However, with a Charge Count (Use) of 0, there are some inexplicable issues. Even though I have a Charge Count (Start) of 0, the ability starts with the max number of charges, 5. Attempting to remove charges via trigger does nothing. Setting any value for Charge Time Start or Charge Time Use does nothing as well.
I ran into similar issues with ability charges and triggers. Some times the natives work and correctly modify charges, while other times they appear to be ignored entirely. I did notice that if the unit is subject to ownership change the ability charge number appears to be reset to maximum automatically and cannot be modified instantaneously (at time of transfer). You could try using 1 frame waits and attempt to set the charges multiple times until they are set correctly.
if youre using modified UI i dont see any problems at all. use dialogs or hookup & modify charge count label of the command button since there are no reliable ways of doing this with data.
Below Count (Max), Count (start) and Count (use), you will see a completely irrelevant-looking field called "Info ^ - Charge ^ - Location ^". Change it from "Ability" (the default) to "Unit". If you have a bunch of different charged abilities on one unit, you'll need to select a different random Link^ from the drop down for each of the abilities, so their numbers don't all synchronise when one changes. Ouila!
Hi all,
I have a targeted ability that deals damage and grants the caster a stack of a behavior if that damage kills the target. I would like to make it display the stack count of this behavior on the button, without having to create a dialog display for it.
In order to accomplish this I was going to try to use the ability's charge count to display this by adding and removing charges to match the number of stacks of the behavior. I figured that by giving the ability a Charge Count (Use) of 0, the ability could still be casted even if the stack count (and therefore charge count) were 0.
However, with a Charge Count (Use) of 0, there are some inexplicable issues. Even though I have a Charge Count (Start) of 0, the ability starts with the max number of charges, 5. Attempting to remove charges via trigger does nothing. Setting any value for Charge Time Start or Charge Time Use does nothing as well.
Does anybody know how to fix these issues and accomplish what I wanted?
Thanks
i think you cannot use a charge count of 0. i would reference data of an dummy effect inside that button. then simply change the value of that dummy effect to match the number of charges (buffs) with catalogs
i'm lazy lately and don't want to make a sample map, but i think you can try to use COST LINK. You need another dummy ability or behaviour or weapon that will use this charges as it's cost, but is muted, then you will have to link that cost to your actual ability, but you shouldn't define cost in it (usualy if you want a proper link you must set cost and cooldown etc in both linked abilities but for this stuff leave it blank, just modify a cost link string value), so charges won't be needed to cast abil.
I'm not sure if this will work though..
EDIT: ok i quickchecked this and it seems link doesn't work without the actual cost values defined so nvm...
I say make the buff apply a dummy weapon and use charges on that to display the number of stacks using a counter system that compares buff stacks to charge counts. Use Unit Compare Charge Used and Unit Compare Behavior Count validators and a system like my choosable attribute system demo map.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
A dummy weapon wouldn't help because the map has a custom interface with no use of the original weapon display. Really needs to be on the ability button itself (or perhaps the buff bar).
it's possible to hook up buttons but dunno if it is possible to change the charge counter with that (was able to activate the autocast animation on inventory buttons)
I ran into similar issues with ability charges and triggers. Some times the natives work and correctly modify charges, while other times they appear to be ignored entirely. I did notice that if the unit is subject to ownership change the ability charge number appears to be reset to maximum automatically and cannot be modified instantaneously (at time of transfer). You could try using 1 frame waits and attempt to set the charges multiple times until they are set correctly.
You could try giving the unit a Buff behaviour with a really short duration with a Modify Unit that sets the charge count of the ability to 0.
could you modify the toolip using the data reference function?
if youre using modified UI i dont see any problems at all. use dialogs or hookup & modify charge count label of the command button since there are no reliable ways of doing this with data.
8 years later, I have the fix and it's simple AF:
Below Count (Max), Count (start) and Count (use), you will see a completely irrelevant-looking field called "Info ^ - Charge ^ - Location ^". Change it from "Ability" (the default) to "Unit". If you have a bunch of different charged abilities on one unit, you'll need to select a different random Link^ from the drop down for each of the abilities, so their numbers don't all synchronise when one changes. Ouila!