edited December 2023 in ORK Scripting
Hi, is it possible to get the selected ability along with it's info (name, cost, status changes etc.) from the battle menu via script?
Is there an event or something that can achieve this?

Also, is it possible to create my own custom UI only for the battle part and still use ORK to handle functionalities behind the scene?

Thank you!
Post edited by tanatwatw on
  • edited December 2023
    Yes, that's possible like this:
    IShortcut shortcut = ORK.Battle.SelectingCombatant.Battle.BattleMenu.GetCurrentlySelectedShortcut();
    The shortcut is e.g. an AbilityShortcut or ItemShortcut if an ability or item is selected.

    You should do null checks for ORK.Battle.SelectingCombatant and ORK.Battle.SelectingCombatant.Battle.BattleMenu, though. Otherwise that could cause errors e.g. if there's currently no selecting combatant or a non-player combatant (without a battle menu).
    tanatwatw said: Also, is it possible to create my own custom UI only for the battle part and still use ORK to handle functionalities behind the scene?
    Sure, you can pretty much do whatever you want. You can also integrate your custom UI e.g. with using HUDs by having a HUD that shows up in battle, but the HUD prefab is just your custom UI setup.
    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!
  • Thank you for your reply!
Sign In or Register to comment.