Hi,

I'm using grid-based phase battles with Move as the default action, exactly like in the Mission Grid Battles demo. Now, I made an Ability that's not targeting a specific combatant, but rather a grid cell. So, in Target Settings, I use:
Target Type: All
Target Range: None
Select Target Cell: True

And then, I use a Use Range Setting with a template that allows the user to select one of two cells on each side of his character.

The position of the selected cell is then used in a function called from a Call Function node in a Battle animation.

When I select this Ability in-game, I can choose the cell and everything works fine. However, if I choose to cancel the Ability while in cell-selection mode, then it cancels the Move action as well. Since I have no Move button (it's the default action), the user can no more move his character.

What's interesting is that this ability is the only one that has a problem with cancelling. If I cancel an attack action that target real combatants (instead of a cell), the Move action is NOT cancelled.

I worked around this issue by unchecking Allow Cancel from Battle Grid Settings/Target Cell Selection, but I'd really like to make it possible for the user to cancel at the Target Selection stage.

Any help?
  • Are you using First Action or Always for the player's auto grid move? Also, which battle system are you using?
    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!
  • It's set to Always, but I tried First Action and it didn't solve the issue. As I wrote, I use Phase battle system.
  • I'll check it out.
    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!
  • I didn't run into that exact problem, but a similar issue - might be that this also fixes yours.
    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!
  • Great! Hope it is! If not then, I'll try to reproduce the problem from a blank scene.
  • Hi GiL,

    Just to tell you that I tried to cancel the grid cell selection with the latest build (2.28.0 BETA) and it now works perfectly!

    Thanks!
  • Yay :)
    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!
  • edited January 14
    Oops... I don't know what I did, but the cancel button doesn't work most of the time anymore. When I want to cancel an action that is triggered by the shortcut menu, it works and it returns automatically to the move action. But then, if I hit Cancel again, the move action is cancelled and I can't move anymore. The same happens if I trigger an ability via the Use Battle Action node in a game event: when I cancel the target selection stage, it doesn't revert to the move action as it should.

    However, this time, I have a hint for the source of the problem: In Battle Systems/Battle Menus/User Highlight, I've made the menu user blink. However, when I hit cancel for anything other that an ability from the shortcut menu, the current combatant stops to blink, as its Battle Menu is no longer opened. So, what happens is that the cancel button closes the (hidden) Battle Menu is addition to cancelling the current action!

    I found a workaround for this. In an Update function of a script, I do the following:


    if (ORK.Battle.InBattle)
    {
    Combatant selectingCbt = ORK.Battle.SelectingCombatant;
    if (selectingCbt != null)
    {
    if (!selectingCbt.IsEnemy(ORK.Game.ActiveGroup.Leader))
    {
    if (selectingCbt.Actions.IsChoosing)
    {
    if (!selectingCbt.Battle.BattleMenu.IsOpen)
    {
    ORK.Battle.SystemSettings.phase.CombatantSelected(selectingCbt);
    }
    }
    }
    }
    }


    By doing that, it works perfectly, but I'd really like to understand why the cancel command doesn't work as it should all the time...
    Post edited by ArsMagika on
  • I think you've canceled out of the combatant's action selection and returned to selecting a combatant.
    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!
  • edited January 14
    Well, yes this is what happened. However, my question is why did this happen? Since I don't do anything on my side with the cancel input, something must happen inside the ORK framework to cancel the combatant's action selection, right?

    Basically, I don't want to be able to cancel action selection. There should always be one combatant selected. I should only be able to switch from character to character, or end the turn.

    The thing that's puzzling me the most in fact, is that when I cancel target selection from an ability triggered from a shortcut menu, it returns to Action selection, as it should. However, if I trigger the same ability from a game event (with an event interaction component and a Use Battle Action node), then if I cancel the target selection of this ability, it cancels both Target selection AND Action selection, and it returns to Combatant selection. I guess it's because I don't use the (hidden) Battle Menu to trigger this ability, so the Battle Menu think I'm still in Action selection instead of Target selection so, when I hit cancel, the Battle Menu revert to Character Selection... But how can I prevent that (aside from checking every frame as I'm doing right now)?

    Any clue?
    Post edited by ArsMagika on
  • edited January 15
    I'll look into adding an option to not cancel out of a selected combatant.

    Why it's happening is simply due to the fix/change - using auto grid move selection and no battle menu will cancel out of the combatant and return to the combatant selection.

    Battle menu and shortcuts work together, if you use an event or scripting, that's probably not the case. I'd be more interested in how you got to the target selection via the Use Battle Action node, as that'll use that action without target selection :)
    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!
  • edited January 15
    gamingislove said: I'd be more interested in how you got to the target selection via the Use Battle Action node, as that'll use that action without target selection :)
    Ah! You're right! In fact I didn't use a Use Battle Action node, I used a Call Function node in which I use the following script:

    new AbilityBMItem(combatant.Abilities.Get(id)), null).Accepted(combatant);

    This effectively triggers the Target Selection on the ability. However, if I cancel it, it also cancels Action Selection and returns to Combatant selection, as you wrote.

    Anyway, thanks for the explanation! Everything is clear now! I look forward for the option to not cancel out of a selected combatant...
    Post edited by ArsMagika on
  • edited January 16
    Do you have Auto Select enabled in the Player Combatant Selection of your phase battles?

    Edit: Actually - there is already an option in the grid move settings (Battle System > Battle Grid Settings) to prevent canceling out of the grid move selection. Disabling Allow Cancel should solve your problem (maybe in combination with Auto Select enabled in the phase combatant selection settings).
    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!
  • I had Auto Select enabled, but Allow Cancel was also enabled. So, turning it off solved the issue, as you suggested.

    Thanks!
Sign In or Register to comment.