Quick question regarding controller/joystick extension

This might seem like a basic question but I want to be sure before performing a bunch of unnecessary work. I have checked the extension page here but didn’t see the answer I was looking for.

I have a few projects that will be really great with a controller, so I’ve had my mind on testing this extension for a while. I was very pleased when testing it to find out how quickly it works. Here’s the simple beauty of my first try:

So my question is, when using this extension, do I need to write specific conditions for each type of joystick? Will the extension correlate the circle/square/triangle/cross of my playstation controller with A/B/C/D of an xbox controller? I have no other controllers around to test it on.

Not sure who’s responsible for this wonderful extension but thank you very much. I know what I’ll be doing for the next week… trying to work in gamepad controls on all my prior releases :slight_smile:

1 Like

Layouts can be different.
You must use the both layouts, for xbox and for PS with a OR condition.

Wow this wiki page has been forgot sorry, i’ll update it soon!

Thank you :slight_smile: I’d rather do it right the first time.

I also noticed the controller extension uses the LastTouchID used for touchscreen input. Would this potentially cause a conflict if a game was to use touchscreen as well as controller input? Should I use a variable like

IF controls = 0 {conditions and actions for touchscreen}
IF controls = 1 {conditions and actions for keyboard}
IF controls = 2 {conditions and actions for joystick}

The gamepad extension has no relation to touchscreens, so I’m not sure what you’re referring to there.

However, for your actual question, I basically do
“If gamepad 1 is connected > all gamepad actions”
“If gamepad 1 is connected (inverted) and is mobile device (inverted) > all keyboard actions”
“If gamepad 1 is connected (inverted) and is mobile device > all touch actions”

There are conditions for each of the scenarios above built into the engine and the gamepad extension.

1 Like

Sorry that was me not paying close attention. While I was looking at the events I saw LastButtonUsed and also playerID and somehow my eyes crossed them into LastTouchID.