Xbox Comptiablity Scripting?

I wasn’t sure whether to put this under scripting support or Xbox developer support.

Anyways,
I am wondering how you guys set up your game for Xbox support? This is how I currently have it set up…
Capture

For example,
I have tabs you can select


So in PCActions, it has all the actions that happen when you click one of the buttons. However, for Xbox I want it to be using LB and RB to move tabs LB to go left and RB to go right. Those actions happen in XboxActions.

Is my current set up efficient enough, and if not what can I do to improve it?

Thanks,
Bylocks

Whenever I script for both platforms, I tend to use UserInputService and use both keys for both platforms in the same if condition, so that keys that are supposed to do the same action use the same code, but it’s up to you.

5 Likes

You could use the same dual-script approach you’ve got now, but use a module or remote function to keep organized and not have recursive code. I used ContextActionService to bind all types of key input to a function, then I made a small script that checks if Touch input is enabled, and if the screen resolution is low enough / phone resolution then it adds buttons that run the same function when pressed. I think in your case, the first option might work best. Usually you can combine the 2 scripting to one though.

2 Likes