I am trying via schematics to interrupt the player when it's using an ability /selecting a target but I can't get the conditions right since with this schematics the player never clears the current action.
image
  • The Set Battle Action Finished node will finish the action the schematic is used by (according to your screenshot). It can also be used to finish an action that's stored in selected data, e.g. using the Select Battle Actions node to get the player's active action.

    There's also the Stop Battle Actions node to stop battle actions - either all or e.g. only from a defined 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!
  • I made some progress in the sense that this new schematic works for most abilities except my base attack and similar abilities which involve a looping schematic.

    This is the updated interrupt

    image

    image

    And this is the looping schematic for the base attack that I can't seem to break out of :(

    image
  • There is the Is Schematic Stopped node to check if the schematic is stopped (which is done when the action is stopped). Use that to break out of the loop - otherwise, depending on the setup, the loop might be going forever.
    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 tried to add the Is Schematic Stopped node after the Calculate Action but it didn't break the loop.
    After few attempts I was able to find a workaround using an interrupt variable that gets set in the global machine schematic and checked inside the battle animation schematic loop.

    One thing though that still doesn't reset properly is the Battle Actions Can Choose and Is Choosing back to the default values.
    Can it be done though a schematic node or via code?
  • No, those should be done automatically based on the state of the combatant - might be that something else is going on, since the Is Schematic Stopped should work.
    Are you sure you stopped the correct action (or the correct combatant's actions)?

    Also, generally for stopped schematics, every node has the Execute On Stop setting to handle if the node is used in a stopped schematic or not. On stop, the schematic will still follow it's node chain until the end, but check nodes will use the first slot to continue without doing checks (unless Execute On Stop is enabled).
    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 August 7
    I hope I stopped the correct actions I am not 100% sure.

    I tried to showcase here the details on the key nodes in the interrupt schematic, I hope this helps...
    Full schematic

    image

    Check status node

    image

    Is Targeting Combatant node

    image

    Select Battle Action node

    image

    Set Battle Action Finished node

    image

    Call function node
    This is setting a variable to break the loop in the abilities schematic

    image

    Change selected target node
    This is setting a variable to break the loop in the abilities schematic

    image

    Call function node
    This is the function referring to the custom code to stop the player's target selection.
    player_combatant.Battle.BattleMenu.StopTargetSelection();

    image
    Post edited by ChimpLogik on
  • edited August 7
    The Check Status node has no status condition added - this should result in Failed in any case. Either add a condition or remove the node, otherwise nothing of the rest of the schematic should actually be used.

    Also, how's the Change Selected Target node setting a variable? The node (how you set it up) will remove the currently selected targets from the group targets.
    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 August 9
    I didn't set any variable in the Change Selected Target node (not sure how to do it, doesn't seem there's any option in the node), my understanding on the current setup was it would have cleared any targets for the Player.

    I introduced a Set Battle Action Finished node in the melee ability loop and a Check Function and Is Schematic Stopped nodes both with Execute on Stop and it brough some improvement but there are still cases when the Battle Actions Can Choose and Is Choosing doesn't reset properly to the default values.
    I tried to narrow down the issue and it seems related to not being able to select new targets (invalid) after interrupting the looping abilities but still being able to re-select the original target.

    image
    Post edited by ChimpLogik on
  • ChimpLogik said: Change selected target node
    This is setting a variable to break the loop in the abilities schematic
    I just mentioned the variables because you stated this - the node isn't used for variable changes, so I was a bit confused on what you meant there :)
    The node is also only used for the selected group/individual targets, so not related to e.g. target selection during battle menu or action target selection.

    As for this update - you can just use the action local selected data within schematics of an action. This is the access to the action the schematic is used by, so you can stop that action specifically, e.g. in case that other object selected data has changed.
    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 August 9
    My mistake , I think I accidentally copy-pasted the text from the previous node :(
    ChimpLogik said: Change selected target node
    This is setting a variable to break the loop in the abilities schematic
    What is the difference between selected individual targets and action target selection, Isn't selecting an individual target during a battle an action target selection?
    Post edited by ChimpLogik on
  • If I remember correctly, your project uses the group/individual targets mainly.
    They're used to mark a combatant as target for the group or individual combatant - independent of action target selection.

    Usually, you select an action which prompts the target selection (i.e. the action's target selection). Group/individual targets are e.g. used for tab-targeting systems, where you have a selected target and automatically use actions on it - so after selecting the action it'll automatically use the group/individual target as target without promting the target selection.
    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 August 11
    That's correct, currently most actions use individual targets or no targets in case of AOE abilities.

    My game is (trying to be) an action RTS so I am expecting players to frequently switch/interrupt abilities, which might require frequent target selection since different abilities need different targets.

    With that in mind, is there a better solution than using group/individual targets?
    Post edited by ChimpLogik on
  • edited August 12
    Probably not - group/individual targets are used for having a target available and automatically use actions (that need a target selection) on it. So if that's the style you want, that's perfect for it :)
    AoE abilities are still used on their own, so they prompt the raycast target selection for the AoE position.
    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!
  • Good to know :)
    Is there a way via schematic to know if the L-Mouse (ar any mouse input) was clicked over an UI/HUD element or a specific layer object on the UI layer?

    Since the interrupt is called by the LClick and one of the abilities selection method is LClick on the Shortcut HUD, it might be worth removing that scenario from the interrupt to avoid conflicts.
  • Input keys have the UI Blocks Input option for this - basically not having input when over UI.
    There's currently no way to check it otherwise.
    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!
Sign In or Register to comment.