Hi,

Is there a way to set a status effect to be removed from a combatant when that combatant uses any ability or action except a specified action/ability?

I am trying to do something like a charged-attack ability mechanics in a turn-based battle system. My idea is that this ability allows you to cast on self or an enemy. If you cast it on self, you gain a specified amount of "charges", then ends your turn. If you cast it on an enemy, it will expend all your accumulated charges and deal damage based on how many charges you have accumulated and expended at that point.

However, if you do any other action or use any other ability other than the specified same ability, it will reset/remove all your accumulated charges back to 0.

This is sort of like holding down the attack button in a real-time battle and entering a "charging" state.

I've set it up as far as being able to gain and hold charges (stored in a status value or variable), and then deal damage based on how many charges are expended, but I can't find a way to implement the highlighted part above, which is cancelling the charge (resetting charges to 0) if the combatant use a different ability or perform any other action.

My initial approach is to also grant a status effect on the user to sort of tag him as being in a "charging" state, and upon removal of this status effect, it will reset all his accumulated charges to zero.

But then I cannot find a way to remove this status effect when uses a different ability or perform any other action.



Thank in advance!
  • edited October 2022
    The ability start/end schematics can be used to do this automatically on all abilities (that use them). The schematic can check what kind of action they're used by using the Is Battle Action node. So, basically checking for the ability that doesn't remove the effect and remove it in the Failed slot.

    For the rest, you can handle this via the Target Settings of the ability. The target changes can use the Is Enemy setting to use changes only on enemies, allies or on all. There are also optional conditions you can add to each target change.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove

    Brilliant! I was able to do it another way without having to add a separate start/end schematics on all relevant abilities - I set the status effect duration to 1 Action, so if it's not reapplied by the same ability then it will be removed. Seems to work as intended for now.

    In the same vein though, how do we set changing an equipment to cost 1 Action?

    I can't seem to find it. In Battle Settings, the options are there to set Own Action Cost for Item Use, Abilities, Attack etc, but not Equipment Change.




    Again, great work! And thanks in advance.
  • Equipment, AI behaviour/ruleset and class changes aren't actions, so they're not part of the system like that.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.