I want to show the player what the enemy’s next move (as determined by its Battle AI) will be.

What’s the simplest way to implement something like this? I think I need read and display the AI’s first queued action, and some sort of loop that runs every frame to conditionally run the battle AI (e.g. when nothing is queued, or when stunned) but not execute any actions from the queue.
  • edited March 23
    Depends on when this should be displayed - e.g. after the combatant decided the action or e.g. having the combatant decide at the end of it's turn what it's next action is (which you can do via turn end schematics and the Use Battle Action node to set the next action of the combatant using it's battle AI).

    Generally, you can display actions via HUDs, e.g. using the HUD Combatant Action (Content Provider) component to get the Next action of the combatant and use that content provider in other HUD content components to display that information (e.g. name, icon, etc.).
    There's also the HUD Combatant Action List component that can list multiple actions a combatant is involved in (either as user or target).

    And, finally, there's the Battle Action HUD type to list actions, similar to the Combatant HUD type.
    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!
  • Calling the AI with Use Battle Action node with Queue mode worked, except I'm still having a little bit trouble displaying the action.

    I used HUD Combatant Action (Content Provider) which fetches the action fine, but I noticed that it didn't work with Action Information HUD Status Text component. Looking at the code, it looks like the latter is expecting a BaseAction type while the former is providing a DragShortcutWrapper. If I use the Shortcut type, then I lose target information.

    Is HUD Combatant Action (Content Provider) intended to be used with some other HUD components?
  • edited March 26
    Ended up writing my own Content Provider that returned just the BaseAction, and my own HUD component that displayed the intent (wanted something like an ability type icon + combatant target icon list anyway, would be easier to code it directly).

    The extensibility of ORK continues to make me very happy :)
    Post edited by Flying_Banana on
  • Ah, yeah, that component provides it as a DragShortcutWrapper, because that's used by pretty much all shortcut related displays (e.g. showing ability, item or just regular shortcut content in your HUD).
    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.