• I realize that Question 10 is somewhat relative to Question 2 so I started messing with a script. The weirdest thing is occurring. The script detects the button press practically anywhere, in any scene except the battle scene. It's like the script doesn't exist.

    Because of that I've been trying to write up a second listener assuming there might be a conflict with detection between Unity's Input Manager and the ORK Input Keys but I've no proof, just flipping rocks over.

    17 is the index number of my submit button in ORK. As this code stands, the PS4_X button is detected no problem EXCEPT during the battle scene whereas the button works but does not activate this script. Any other scene works fine. The ORK call I think is messed up though because the console is just showing constant instances; I think it's reading as a true/false instead of detecting an actual button press.

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    using ORKFramework;
    using ORKFramework.Behaviours;
    using ORKFramework.UI;
    using ORKFramework.AI;

    public class CommandFunction : MonoBehaviour {

    void Start ()
    {

    }

    void Update ()
    {
    //END TURN
    if (Input.GetButtonDown ("PS4_X"))
    {
    Debug.Log ("Player has pressed X!");
    }

    if (ORK.InputKeys.Get(17).GetButton());
    {
    Debug.Log ("Player has pressed SUBMIT!");
    }
    }
    }
  • edited December 2017
    image

    Some more sherlocking and I realize this setting is what's preventing the script from responding to the button presses. Having some trouble tracking down what controls this setting though.

    EDIT: I disabled the "Reset Unity Input" checkbox in the base settings of the gui box used for the battle menu and now the script responds to the button press.
    Post edited by superschure on
  • edited January 2
    Been messing around with the script you gave me in your answer to Question #2. I have "combatant" in my script as Public Combatant combatant; which works fine and gives me access to the combatant. But I can't for the life of me find the code necessary to call the commands the same as in the battle menu. (Attack, Defend, Item, Abilities, Move, End) like Item would bring up the Item list for me to comb through rather than a shortcut to directly choose a specific item. I'm sure this is actually quite simple but it's been flying over my head, thanks again for your help.

    For reference...

    combatant.BattleMenu.StartTargetSelection(shortcut, false);

    UPDATE: Was able to get Attack and Defend working via control maps, still working on the others.
    Post edited by superschure on
  • I've been able to bring up the Item menu and Abilities menu via control maps whereas a single button calls a global event asset that in turn calls the respective menu. Only problem here is that any item or ability I select that targets the enemy won't actually target; only the items or abilities that target my allies will work. For example if I use the same item menu within the battle menus and use a fire scroll it targets normally. However if I access the same fire scroll through the same item menu without going through the battle menu I'm not allowed to target at all.

    So close yet so far. :(
  • Well, the menu screens are only for the group - battle actions are selected via battle menus.
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
  • So I sat in a coffee shop all day and burned through my retinas to figure out a solution within my means. I created a script attached to the GUI box of the Battle Menu that listens for button presses and translates them into invokes of their respective choice in the Battle Menu. So now I can choose without having to go through a list via directional presses. So far no bugs to report either.
Sign In or Register to comment.