Hello! In a turn-based grid battle. I have a formula that I need to return a different value depending on whether or not it's the combatant's turn or not. (It's for an attack that can be executed either as a basic attack during the combatant's turn, or as a counter-attack during another combatant's turn. The effects vary on whether it happens during the turn or not).

The only way I've managed to do that so far is to set up a status effect, "duringTurn", that's automatically added at the beginning of the combatant turn, and removed at the end. Then the formula looks for that status effect. It feels kinda hacky though. Is there a more elegant way of doing that? Is there already a formula node that will return whether or not it's a combatant's turn?

Thx!
  • There's an easier way to do it - use the allmighty Check Status node (available in formulas, battle AI and events).

    It offers the Turn State check to determine if a combatant is before it's turn, during it's turn or after it's turn.
    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!
  • Cool, exactly what I was looking for! You're the best... ;)
Sign In or Register to comment.