In Warcraft 3, a player could select a unit and right click on a Moon Well. That would make the Moon Well replenish life and mana at the selected unit.
I have created a kinda similar ability in the SC2 editor, based on a battery-type ability. Whenever a player selects one unit and then right-click on a specific structure, that structure adds a buff to the unit.
I want the structure to lose energy each time it applies a behavior to a unit. However, there is no option of setting an energy cost for a battery ability.
I am trying to work around this with a set-effect linked to a modify unit-effect that drains energy, as soon as the ability is used.
It appears that battery-abilities do not work when there is a set- effect involved.
Any idea how to make a battery ability cost energy when used?
I'm taking a guess here, but maybe look into click behaviors (like what critters have). There are issue order effects, which you could have the click behavior use. I'm just not sure how you'd have it target your selected unit with data alone. Could probably do with a trigger/data hybrid, or maybe even just triggers, as there is a unit clicked event.
Thanks, I might have jumped to conclusions too fast. It seems like set-effects do indeed work in battery-abilities, and by using some validators does the ability work as intended. (Seems ok so far, hopefully are there no bugs... ) Sorry to bother the forums with this thread
If you do resort to using click behaviors (though I think it's only left-clicks), you have to uncheck the "Unclickable" flag on the unit, or else clicks will not register with click behaviors on that unit.
What you want is the Battery type ability. This specifically runs an effect on units that right click it. What you will want is the set effect to have the modify unit effect target the caster, and the real effect target the target. Alos use a validator in the set effect to control if the effect runs when the energy is not present.
In Warcraft 3, a player could select a unit and right click on a Moon Well. That would make the Moon Well replenish life and mana at the selected unit.
I have created a kinda similar ability in the SC2 editor, based on a battery-type ability. Whenever a player selects one unit and then right-click on a specific structure, that structure adds a buff to the unit.
I want the structure to lose energy each time it applies a behavior to a unit. However, there is no option of setting an energy cost for a battery ability.
I am trying to work around this with a set-effect linked to a modify unit-effect that drains energy, as soon as the ability is used.
It appears that battery-abilities do not work when there is a set- effect involved.
Any idea how to make a battery ability cost energy when used?
I'm taking a guess here, but maybe look into click behaviors (like what critters have). There are issue order effects, which you could have the click behavior use. I'm just not sure how you'd have it target your selected unit with data alone. Could probably do with a trigger/data hybrid, or maybe even just triggers, as there is a unit clicked event.
Thanks, I might have jumped to conclusions too fast. It seems like set-effects do indeed work in battery-abilities, and by using some validators does the ability work as intended. (Seems ok so far, hopefully are there no bugs... ) Sorry to bother the forums with this thread
If you do resort to using click behaviors (though I think it's only left-clicks), you have to uncheck the "Unclickable" flag on the unit, or else clicks will not register with click behaviors on that unit.
What you want is the Battery type ability. This specifically runs an effect on units that right click it. What you will want is the set effect to have the modify unit effect target the caster, and the real effect target the target. Alos use a validator in the set effect to control if the effect runs when the energy is not present.