Hey there.
I’ve got a little problem with the new UI and navigation trough UI Objects (especially buttons) with a controller (like the Dualshock 4 Controller)
So, I wanted to implement a turn-based battlesystem like in JRPGs. The basic state-machine is already implemented (Battle is Triggered, Players Turn, Player chooses an Action, Enemys Turn, Enemy Chooses an Action, Players Turn again, and this till one of each other is dead). For now I choose the action of the players with the mouse, but I would like to do it ONLY with my controller.
For now it works like this:
In order to use my controller for navigation I MUST click on a button first, and only then I can move trough these buttons
-
Click on Button
-
Then I can use my controller (I used the left stick to move down to the Attack-Button)
So how can I only use my controller for navigation without depending on mouse-clicking at all?
Mouse-Clicking also does some weird things and I don’t know if this is a bug or a feature or something else.
The moment I click on the button “TriggerBattle”, the battle is…well…triggered and an event from my own EventManager is raised to the Battle-State-Machine who calls the function to start the Battle-FSM.
When I click on “TriggerBattle” the event is sent and I get my Logs:
Now I can click one of the Action-Buttons in order to choose an action, but as you see the “TriggerBattle”-Button is still highlighted, and the problem is, the moment I click somewhere else, in the empty space or another button the “TriggerButton” registeres another click! Of course the event is raised again!
This is a problem, since I only want to raise these events one time only.
I found out, when I uncheck “Send Navigation Events” the buttons don’t register second clicks
So when I first click on “TriggerButton” and then somewhere else everythings works fine, but then I can’t move with my Controller trough the UI Elements.
In the end I just want to move around with the controller, without depending on the mouse.
Any suggestions/ideas?




