Option for Two Control Methods
JoshKahane
Member Posts: 470
Hi
I have been trying to get both Joystick and accelerometer controls working only I can't figure out how. I want it so that when your on the settings menu and press a button it swaps out the joystick for the accelerometer and visa versa.
Any help much appreciate as always, thanks.
I have been trying to get both Joystick and accelerometer controls working only I can't figure out how. I want it so that when your on the settings menu and press a button it swaps out the joystick for the accelerometer and visa versa.
Any help much appreciate as always, thanks.
Comments
You can have global attribute called "Controls". (set it to integer)
In all of the rules you have for player control,
add a condition that says:
When game.controls = 1
(use accelerometer controls)
When game.controls = 2
(use joystick controls)
When game.controls = 3
(use keyboard controls)
This is also where you would set the joystick's alpha to 0 or 1, depending if it is supposed to be visible or not.
Hope this helps!