So I'm trying to make an ability with a toggle, to turn the flashlight on and off.
While It's on, I want it to periodically drain charges from the ability (the charges display the battery power of the flashlight) and apply a behavior that turns on the flashlight actor. Casting the ability again will turn the flashlight actor off, and periodically regenerate the abilities charges.
I also want to make a validator that checks periodically as well, making sure the flashlight has charges remaining, if it doesn't, it turns the flashlight off.
So far, I have the charges displayed on the ability, and while it's on I can see the flashlight, however I can't seem to get the behavior to periodically drain said charges, Haven't worked on the toggle off yet but that comes later.
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
@EchoedRequiem: Go have the behavior linked to an Issue Order effect that orders the unit to use the ability again, or a Modify Unit effect that takes away a charge for that ability.
I'm trying to do the second way you stated but I can't seem to get it to work.
I managed to get the flashlight to have a periodic effect, the effect being a modify unit, that targets the ability, but I can't seem to get it to take the charges away, or change it even a little bit
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
@EchoedRequiem: Go I need more details to know what's going wrong.
Hokay so I cant for the life of me reference charges in an ability anywhere in the data editor, so I made an attribute instead and it more or less works, I drain charges by applying a stacking debuff that lowers the attribute by 1, then recharge it by applying a periodic effect that removes 1 stack of the buff
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
@EchoedRequiem: Go To recharge an ability using the Modify Unit effect you need to set the following fields:
Cost tab
Cost Ability - Define which ability will be modified.
Cost Fraction - Charge - Set it to 1 (full values)
Cost - Usage Charge Count - This is where you add/remove charges, a negative value adds charges and a positive value removes them.
Target tab
Impact Unit - Remember to set the correct target here or the effect wont work.
@EchoedRequiem: Go To recharge an ability using the Modify Unit effect you need to set the following fields:
Cost tab
Cost Ability - Define which ability will be modified.
Cost Fraction - Charge - Set it to 1 (full values)
Cost - Usage Charge Count - This is where you add/remove charges, a negative value adds charges and a positive value removes them.
Target tab
Impact Unit - Remember to set the correct target here or the effect wont work.
I ended up just keeping what I had, but that info really helped with my reload ability, thanks buddy!
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
To post a comment, please login or register a new account.
So I'm trying to make an ability with a toggle, to turn the flashlight on and off.
While It's on, I want it to periodically drain charges from the ability (the charges display the battery power of the flashlight) and apply a behavior that turns on the flashlight actor. Casting the ability again will turn the flashlight actor off, and periodically regenerate the abilities charges.
I also want to make a validator that checks periodically as well, making sure the flashlight has charges remaining, if it doesn't, it turns the flashlight off.
So far, I have the charges displayed on the ability, and while it's on I can see the flashlight, however I can't seem to get the behavior to periodically drain said charges, Haven't worked on the toggle off yet but that comes later.
@EchoedRequiem: Go have the behavior linked to an Issue Order effect that orders the unit to use the ability again, or a Modify Unit effect that takes away a charge for that ability.
@SoulFilcher: Go
I'm trying to do the second way you stated but I can't seem to get it to work.
I managed to get the flashlight to have a periodic effect, the effect being a modify unit, that targets the ability, but I can't seem to get it to take the charges away, or change it even a little bit
@EchoedRequiem: Go I need more details to know what's going wrong.
Hokay so I cant for the life of me reference charges in an ability anywhere in the data editor, so I made an attribute instead and it more or less works, I drain charges by applying a stacking debuff that lowers the attribute by 1, then recharge it by applying a periodic effect that removes 1 stack of the buff
@EchoedRequiem: Go To recharge an ability using the Modify Unit effect you need to set the following fields:
Cost tab
Cost Ability - Define which ability will be modified.
Cost Fraction - Charge - Set it to 1 (full values)
Cost - Usage Charge Count - This is where you add/remove charges, a negative value adds charges and a positive value removes them.
Target tab
Impact Unit - Remember to set the correct target here or the effect wont work.
I ended up just keeping what I had, but that info really helped with my reload ability, thanks buddy!