Hey,

I'm running into a small issue regarding Grid Cell Highlights. I have a combatant that swaps between the allied and enemy faction during its death schematic.

As illustrated here, the faction change itself works, but the Combatant Cell Highlight isn't updated to reflect that change. I also tried the same procedure for the move schematic in the 2D Grid Battle Tutorial, leading to the same result.

From how I'm interpreting BattleGridHighlightSettings.cs, GetCombatantCellHighlight() seems to update the highlight based on the combatant's faction if AfterTurn Highlights are enabled. Unfortunately, even that doesn't seem to set the faction specific highlight on the combatant.

Put simply: I'm a bit lost on how to get the Combatant Cell Highlights to update on faction changes and would greatly appreciate some orientation.
  • I don't think that's currently updated automatically - I'll check it out.

    Meanwhile, you can try removing the combatant from the cell and putting it back on it.
    E.g. in your death schematic:
    - Set Grid Cell Combatant node where you set the combatant as Remove > this removes it from the cell (both combatant and cell use Machine Object for the dying combatant, this also gets the cell)
    - Set Grid Cell Combatant node again where you set the combatant as Combatant as Combatant of the cell, using Use Nearest Cell

    That should reset the highlight - not sure if a short wait between removing and setting is needed, theoretically not :)
    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!
  • Works perfectly, thank you so much!

    I have the remove and reassign cell nodes wrapped around the faction check & change nodes, so there might be a tiny natural delay in my case. But for what it's worth, I can confirm there's no wait time needed beyond that.
Sign In or Register to comment.