I wanted to make an ability which sometimes consumes energy on activation, and when it has a certain behavior, it does not.
I've read that abilities can have an array of values (for example cost), so I've done that and I'm playing with validators, but I haven't figured out how to access the 2nd cost in the array.
Can anyone share some light on that matter? Thank you.
Those tend to be for on levelling up the ability using a Learn ability linked to the veterancy type behaviour. For your problem I would use a Switch type effect that has a Modify Unit effect.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Thx for the help, but.. I remember now why I stopped modding xD
Well. The switch you suggested doesn't change the ability, only the vitals of the unit. So... I created a dozen effects and validators which simply check whether the unit has a behavior, if it hasn't, the unit loses energy and the behavior is applied. Well. And it doesn't work. Don't even know why, for a second it did... T_____T
Unless there's a way to affect the ability... maybe I have missed something?
I think this is the kind of thing DrSuperEvil meant:
Ability Effect: Ability_Switch:
Case 1: [Validator: Unit Compare Behavior Count (> 0)] Effect: Ability_Set_1:
Ability_Primary_Effect (Whatever the ability does)
Case 2: [Validator: Combine (Unit Compare Behavior Count (= 0) AND Unit Compare Vital (Energy >= Cost)] Effect: Ability_Set_2:
Ability_Drain_Energy (Modify Unit: Energy: -Cost)
Ability_Primary_Effect (Whatever the ability does)
Basically use a switch to check if the unit either has the behavior or has enough energy, and in the second case use the modify unit effect to simulate the energy cost in addition to the main effect of the ability. The switch uses four validators and four effects, plus however many you need for the ability itself.
if it is not vital that the mechanics actually work like this, there is a second possibility so the player Feels like this is what is happening. You could use two abilities a behavior and two requirements. the behavior would be used to disable the version of the ability that has a price, while the requirements allow and disallow the use of the ability with the cost and with out, depending on if the behavior is active on the unit. by using the same button for both abilities in the command card it would seem as though the behavior were removing the cost.
Alternatively, if the ability and unit are unique (one per player) then it would also be possible to use the behavior to toggle the cost of the Ability with Modify Player effects using the data reference Fields, one that sets the cost to zero as an initial effect on the behavior, and a the second modify player to set the cost back to what you want it when the behavior is removed.
Hello,
I wanted to make an ability which sometimes consumes energy on activation, and when it has a certain behavior, it does not.
I've read that abilities can have an array of values (for example cost), so I've done that and I'm playing with validators, but I haven't figured out how to access the 2nd cost in the array.
Can anyone share some light on that matter? Thank you.
Those tend to be for on levelling up the ability using a Learn ability linked to the veterancy type behaviour. For your problem I would use a Switch type effect that has a Modify Unit effect.
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
Thx for the help, but.. I remember now why I stopped modding xD
Well. The switch you suggested doesn't change the ability, only the vitals of the unit. So... I created a dozen effects and validators which simply check whether the unit has a behavior, if it hasn't, the unit loses energy and the behavior is applied. Well. And it doesn't work. Don't even know why, for a second it did... T_____T
Unless there's a way to affect the ability... maybe I have missed something?
I think this is the kind of thing DrSuperEvil meant:
Ability Effect: Ability_Switch:
Case 1: [Validator: Unit Compare Behavior Count (> 0)] Effect: Ability_Set_1:
Ability_Primary_Effect (Whatever the ability does)
Case 2: [Validator: Combine (Unit Compare Behavior Count (= 0) AND Unit Compare Vital (Energy >= Cost)] Effect: Ability_Set_2:
Ability_Drain_Energy (Modify Unit: Energy: -Cost)
Ability_Primary_Effect (Whatever the ability does)
Basically use a switch to check if the unit either has the behavior or has enough energy, and in the second case use the modify unit effect to simulate the energy cost in addition to the main effect of the ability. The switch uses four validators and four effects, plus however many you need for the ability itself.
Hope this helps!
You can also adjust the Effect: Chance field of the Modify Unit effect to do the probability of removing the energy on cast.
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
Thats what I did, doesn't want to work. :-/ Well thx for help anyways..
if it is not vital that the mechanics actually work like this, there is a second possibility so the player Feels like this is what is happening. You could use two abilities a behavior and two requirements. the behavior would be used to disable the version of the ability that has a price, while the requirements allow and disallow the use of the ability with the cost and with out, depending on if the behavior is active on the unit. by using the same button for both abilities in the command card it would seem as though the behavior were removing the cost.
Alternatively, if the ability and unit are unique (one per player) then it would also be possible to use the behavior to toggle the cost of the Ability with Modify Player effects using the data reference Fields, one that sets the cost to zero as an initial effect on the behavior, and a the second modify player to set the cost back to what you want it when the behavior is removed.