In my game, I want to use some UI buttons to change the player character in the field as well as in combat (Phase-type grid battles where the player can give commands to his party in any order he wants). This UI should always be displayed and consists of 6 buttons, one for each member of the player's party. When in field, I've made it work easily by calling an interaction UI event with a "Set Player" step. However, in battles, this is not working.

I'm currently able to change the current player in battle by clicking on another character of the player's group. I could also change it with a standard Combatant Selection HUD, but then it wouldn't use my custom UI buttons that I want to use both in field AND battles.

Is there a step I could use in an event that would simply select a member of the player's party in a battle the same way that "Set Player" does in field?
  • So, in battle you want this change to the combatant as the one selecting an action?
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Exactly! Like in the Mission Grid Tutorial when you click on a character anytime you want (in the player phase) to make him move or perform any action. Exactly like in a combatant selection HUD in fact, but made outside of ORK with events triggered by a standard Unity button.

    Since there's no Combatant Selection HUD that could be displayed all the time in Field (outside combats) and I need the player to be able to change the current player character in Field, I had to make custom buttons. They work perfectly with the Set Player step. Now, I just want to continue using those same buttons in combat so that my interface is consistent and that the transition between Field and Combat is as seamless as possible.

    However, Set Player does not work to select a fellow combatant in the player's combat group during Phase battles. Is there another step that could do what I'm looking for?

    If no, then maybe another solution can be found. For example, I might try to create 6 Group Abilities that could be permanently displayed as Shortcuts while in Field. Those abilities could each select a specific member of the player's group (again, with the Set Player step in Battle Animations). Then, in combat, I could hide this HUD and show a Combatant Selection HUD with the same GUI box with the "Keep Open" option checked in Player Combatant Selection in Phase Battles settings so it would be shown permanently in combats as well. With some luck it could look almost seamless but it looks a bit more complicated to me.
  • So I tried my second solution but it doesn't work because even with "Keep Open" checked in Player Combatant Selection Settings of Phase Battles, the Player Combatant Selection HUD disappears as soon as I Select a Move action and click on a cell target. It then only reappears after I choose a Do Nothing action (which basically ends my turn). This is weird because I can still select another combatant by clicking on it, but I can't do so with the Combatant Selection menu...

    The more I think of it, the more I think the first solution would be better (going with a custom HUD).
  • I'll add a new node to the event system to change the selecting user of a running phase battle. Will naturally only work with members of the player group (and during the player's phase). Basically the same thing as clicking on a combatant.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 14
    Great! Do you know approximately when this new node could be available? In the meanwhile, would it be possible to achieve that using code? Could you point me to some functions I could use? I've already tried some things like:
    ORK.BattleSystem.phase.SelectingCombatant = ORK.Game.ActiveGroup.BattleMemberAt(index);
    and:
    ORK.Battle.ChangeMenuUserIndex(index);

    However, it didn't work perfectly...

    Thanks!
    Post edited by ArsMagika on
  • edited July 15
    You can use ORK.Battle.SystemSettings.phase.CombatantClicked(combatant) for that, combatant is the combatant that should be selected.
    The function will do the checks if it's a player controlled combatant and the player's phase :)
    Post edited by gamingislove on
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • So simple! It works perfectly. ORK is such a wonderful little beast!

    Thanks again!
Sign In or Register to comment.