This seems fairly simple, but I haven't found any solutions on the forums so I'm starting to doubt whether it's possible (although I remember reading it somewhere)...
In short, is it possible to make an ability cost one vital, but dip into another vital if it is unable to complete the cost with the initial one? Let's say I have an ability that costs 10 shield to cast, but the unit has 0 shield - would it be possible to then have the ability still be usable, but cost 10 life instead?
If I well-know, no, it isn't possible. You can only refer to the actual vital you placed. I think it's impossible but maybe a workaround can do something. Ask DrSuperEvil.
What I ended up doing (although it won't work for any other similar situation) was turn the life cost into a self-damaging effect that ran when the ability was cast, so that it would subtract from the shield when the shield was present, and subtract from life when it wasn't.
Still holding out for a more elegant work-around on this one, but I suppose it isn't all that vital for the time being!
Hard part is the tooltip. Using a switch effect and validators as well as Modify Unit effects you can easily make an ability but getting it to look nice is the main problem.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Just a thought.. to make it look nice, could go to the button flags and remove the show cost flags and then make them part of the description. Would look reasonable so long as there's nothing between where the cost usually displays and where the description is. Could even make a custom icon or color-coded text.
<dref="Cost"/> Shield or Life
Description...
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
This seems fairly simple, but I haven't found any solutions on the forums so I'm starting to doubt whether it's possible (although I remember reading it somewhere)...
In short, is it possible to make an ability cost one vital, but dip into another vital if it is unable to complete the cost with the initial one? Let's say I have an ability that costs 10 shield to cast, but the unit has 0 shield - would it be possible to then have the ability still be usable, but cost 10 life instead?
If I well-know, no, it isn't possible. You can only refer to the actual vital you placed. I think it's impossible but maybe a workaround can do something. Ask DrSuperEvil.
@TheSC2Maniac: Go
Hmm...
What I ended up doing (although it won't work for any other similar situation) was turn the life cost into a self-damaging effect that ran when the ability was cast, so that it would subtract from the shield when the shield was present, and subtract from life when it wasn't.
Still holding out for a more elegant work-around on this one, but I suppose it isn't all that vital for the time being!
Carefull that only work with target ability, you must alter the code for instant ability.
EDIT : Wait there a bug in it, will fix it ;) give me a few minute.
EDIT2 : Okay xD Working correctly now.
Hard part is the tooltip. Using a switch effect and validators as well as Modify Unit effects you can easily make an ability but getting it to look nice is the main problem.
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
Just a thought.. to make it look nice, could go to the button flags and remove the show cost flags and then make them part of the description. Would look reasonable so long as there's nothing between where the cost usually displays and where the description is. Could even make a custom icon or color-coded text.