I've got this ability which holds a few charges, using a charge every use.
Except instead of just recharging over time, X amount will recharge when 0 charges remain, after a cooldown has passed.
Yeah, you've got it. I have an ability with charges that don't recharge. How do I make it so that when all charges are used, it recharges a set number of them?
I'm not entirely sure on how to go about this because I don't know how to check whether or not there are charges left.
So far I just have a charge ability that recharges every X seconds.
The cost field by itself doesn't support this kind of behavior, so you would need a workaround. Possible ways to try would be either restoring the charges with a Modify Unit effect after a behavior expires. You would need to figure out, how to check, if the charges are depleted (probably using validators or requirements), then a behavior could be applied executing the effect after a delay, which in turn restores the charges.
Another possibility would be to adjust the recharge rate of the ability manually, for example via trigger. This would require checking the charges as well. If this should be difficult in data, it can easily be checked via trigger, or you could even simulate the ability charges with a behavior system.
Although I'll probably just use the validator, this got me thinking. Perhaps a stacking behavior? And using charges reduces the stack. When the unit no longer has the behavior it reapplies the stack of X and charges of X.
Hey all,
I've got this ability which holds a few charges, using a charge every use.
Except instead of just recharging over time, X amount will recharge when 0 charges remain, after a cooldown has passed.
All help is greatly appreciated!
Hey.
Sorry, but you might need to add a little more information (and maybe an actual question), so we can help you.
I am not sure, if I understand the design of the spell entirely, so correct me, if I am wrong:
Correct so far?
Also, what exactly is your problem? What did you try, what did you get to work already and what exactly doesn't work?
@Kueken531: Go
Yeah, you've got it. I have an ability with charges that don't recharge. How do I make it so that when all charges are used, it recharges a set number of them?
I'm not entirely sure on how to go about this because I don't know how to check whether or not there are charges left.
So far I just have a charge ability that recharges every X seconds.
The cost field by itself doesn't support this kind of behavior, so you would need a workaround. Possible ways to try would be either restoring the charges with a Modify Unit effect after a behavior expires. You would need to figure out, how to check, if the charges are depleted (probably using validators or requirements), then a behavior could be applied executing the effect after a delay, which in turn restores the charges.
Another possibility would be to adjust the recharge rate of the ability manually, for example via trigger. This would require checking the charges as well. If this should be difficult in data, it can easily be checked via trigger, or you could even simulate the ability charges with a behavior system.
Does this help you in any way?
quick thinking: behavior with disable validator (0 charges)
duration x sec > set effect:
reapply itself add x charges
They added a Unit Compare Charge Used validator type that does just that.
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
Great, I'll try that out!
@Fen1kz: Go
I could see this working, especially with the validator Dr mentioned ><
@Kueken531: Go
Although I'll probably just use the validator, this got me thinking. Perhaps a stacking behavior? And using charges reduces the stack. When the unit no longer has the behavior it reapplies the stack of X and charges of X.
Charges would be easier. Have a buff that on charge depletion activates and adds more.
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