How do I highlight buttons and select them using a Gamepad?

Get help using Construct 2

Post » Mon Feb 22, 2016 4:17 pm

Hi,
I am trying to highlight a button from my main menu screen with a gamepad, and tap on the A button to load next layout
it is a piece of cake with mouse and touch but cant for the life of me figure it out for gamepad.

thanks in advance :)
B
10
S
5
G
2
Posts: 37
Reputation: 1,992

Post » Mon Feb 29, 2016 12:58 am

Have you tried using a visible or invisible onscreen cursor sprite that is controlled by the gamepad movement inputs?

use cursor collision detection events to detect when the cursor is over the buttons

Depending on the layout of your buttons on the screen you could make the cursor snap to the buttons as well for ease of use.

moving the cursor object X number of pixels at a time.
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Wed Mar 02, 2016 12:25 am

That sounds like a great idea, but how do I get cursor to follow gamepad inputs? thanks in advance,
B
10
S
5
G
2
Posts: 37
Reputation: 1,992

Post » Sat Mar 05, 2016 1:33 am

i had the same problem and it took me forever to figure it out. basically you need to create an invisible cross that can move up and down. im away from my home computer but in a few hours i can send you a cap.x so you can see what im talking about. I was going to make it a tutorial but it would be easier just showing people. so if you can wait 5 hours or so. also, i programmed it to be used with keyboard, gamepad direction buttons and joystick as well.
B
6
Posts: 12
Reputation: 270

Post » Sat Mar 05, 2016 5:08 am

updated
Last edited by daggame on Thu Mar 10, 2016 6:06 pm, edited 3 times in total.
B
6
Posts: 12
Reputation: 270

Post » Sat Mar 05, 2016 12:22 pm

Hi daggame, thanks for the help, but I tried loading the cap.x and multiple errors come up like check fail and missing .xml then it closes :(
B
10
S
5
G
2
Posts: 37
Reputation: 1,992


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, Yahoo [Bot] and 9 guests