Instead of having my combatants finish their turn automatically when they have no more action points, I'd like to force the player to press an "End Phase" button to end the player's phase. In order to achieve that, I added 0,1 to the combatant's Action Bar and I created a Unity Button that execute a ORK.BattleSystem.phase.ClearCurrentFaction();. However, it seems to do nothing. I was able to force the player's phase end by using the following:
List<Combatant> activeGroupCombatantList = new List<Combatant>();
ORK.Game.ActiveGroup.GetMembers(MenuCombatantScope.Battle, ref activeGroupCombatantList);
foreach (Combatant c in activeGroupCombatantList)
{
c.Battle.EndTurnCommand(true);
}
With this, I was able to end the player's phase. However, I still had some problem to select my player characters once it was their turn again until I disabled Battle System/Phase Battle/Combatant Selection/Auto Select. Now, the problem with that is that after some actions, the NPC AI characters seem to set ORK.BattleSystem.phase.SelectingCombatant to null, which create some more bugs down the line because my code depends on this variable.
So, I ended up thinking I took the wrong approach. My main question therefore is: Why does ORK.BattleSystem.phase.ClearCurrentFaction(); doesn't end the player's phase in first place? Also, what doesn't work with EndTurnCommand(true) to end all my player's turn and thus, their phase? Finally, what is the easiest way to end the player's phase?
Thanks!