edited March 2016 in ORK Scripting
Hello,

Can I do something like this:
You click a combatant (Outside battle) and UI window pops up with stats of the clicked combatant displayed inside.

I can handle the clicking part, if there is a script to Tag a combatant somehow as active? And use menu screen to display it?

What the most optimal way to do this?
Post edited by gamingislove on
  • Yes - in your component's function (e.g. OnMouseDown), first get the combatant of the game object (see this how-to), afterwards you can call a menu screen with that combatant like this:

    MenuScreen screen = ORK.MenuScreens.Get(int screenID);
    screen.Combatant = combatant;
    screen.Show();


    The screenID is the index/ID of the menu screen in the editor, combatant is the combatant you got from the game object.
    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!
  • Hmm I have combatant scope as Current
    and in status value listing combatant Origin as user.

    But when I open the menu screen that way I get stats for player character, not the combatant I passed. How should it be setup to show current combatant?
  • Hm, if the combatant isn't part of the player group, the menu screen will automatically use the player.
    I can add an option to allow menu screens displaying non-player combatants in the next update.
    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!
  • That would be very helpful thanks. There are many RPG games where you can "Inspect" enemies outside the battle and see some of their stats so I'm sure other users would find that helpful too.

    Meanwhile is there any other for of menu item like hud, with which I could acomplish same task?
  • Well, there's the bestiary system that can be used for a scan ability.

    And HUDs can always display the stats of combatants, e.g. set your Combatant HUD with the stats to use Individual combatant type and Cursor Over to only display them when the cursor is over the 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!
Sign In or Register to comment.