• 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

    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.
  • Hi, I have a super general question - is it possible to change the location of spawned enemies inside of a battle arena scene?

    I got my battle set up in a different scene and going along the tutorial it lays out the positions of my mobs and characters during battle really awkwardly, making for wonky camera movement. I'd like to set them up in a grid-like way, so basically
    A - Ally E - Enemy

    E ---- A
    E ---- A
    E ---- A

    Please let me know if it's possible :)
  • That's handled by the battle spots - the default locations are set up in Battle System >
    Battle Spots
    , but you can override them in each Battle component individually using game objects (e.g. empty child objects on the battle object).
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
  • Question 11) I thought this is something I figured out but put on the back burner and now I can't remember the answer. Is there a way to limit the amount of abilities you are able to hold at any given time, pokemon style? Like you can learn freely but can only hold 4 abilities and have to sacrifice older abilities. Even the option to swap abilities or take up a number of slots is cool too; just exploring my options here.

    Thanks as always!
  • 11) Depends on how you'd like to implement this. E.g. you could offer 4 shortcut slots for abilities and only allow action selection through them (e.g. using HUDs or control maps instead of the battle menu).
    Another way would be to only add abilities through the event system and removing one of the abilities in exchange.
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
  • edited February 2
    Thanks, I'm going to play around with that and see what I can come up with.

    Question 12) do you have any insight on a way to restrict multiple combatants from being the same class? Like if combatant 1 is a Mage then combatants 2,3,etc. cannot change to the Mage class unless combatant 1 has already changed from that class to another? Essentially only one combatant being able to be that class at any given time.

    I've been trying different methods like requirements and conditions being based on equipment being held, stat values, etc., but I keep hitting a logic wall.

    UPDATE: Regarding Question 12) I'm trying to make it that changing a piece of equipment (armor) is responsible for changing the class via a Game Event. So when the armor is equipped the Equip Game Event is called and triggers a class change via ability or just directly. Now this works if I want the result of equipping the armor to call a menu or readout to the console but I can't get it to work on anything that involves the "actor". I think I'm missing a step where it recognizes that the combatant that has equipped the armor should be the recipient of the class change.

    EDIT: Added a picture to help explain.


    So the armor equips no problem but then nothing else happens. :(
    Post edited by superschure on
  • OK, so I figured out that the problem was that I did not setup the actors in the Event Settings starting node. After setting them up I can change classes the way I intended and the system recognizes the different members and changes according to who is wielding the armor. Now the remaining issue is that during battle I want this to end the combatant's turn. I've tried using an End Turn node at the end and the specific combatant's turn does end but it really doesn't. Like the battle information shows that specific combatant is now in the "BeforeTurn" state and the other combatant is now in the "InTurn" state but the focus of the menus and the battle system hasn't actually shifted away from the combatant whose turn has ended.

    Pic for reference...

  • It might be a bug that's currently happening here in case you're using turn based or phase battles. The End Turn node uses a silent turn ending without notifications or animations, which currently can lead to the turn not ending when there are still action points left. Should be fixed in the next update.
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
  • edited February 6
    Definitely using turn based battles so I guess that explains that. On a related note I'm trying to set up a default turn event (start of turn) that checks if the combatant (team member) is "InTurn" and if so to set that combatant as the Player so that the combatant has full control for that given time. However that status requirement is entirely ignored. If I use something else like checking if a specific item is equipped then it works. Could that also a bug or maybe I'm missing a step?
    Post edited by superschure on
  • Well, the turn start events are used before the combatant is set to being in turn.

    However, the turn start events are always fired at the start of a combatant's turn, so you can be sure that the combatant using the event will have their turn next.

    Also, if you need to transfer control over to other members of the player group - there's a setting for that in the Control Block Settings of the individual battle systems :)
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.