Mouse and Keybourd OR gamepad

Get help using Construct 2

Post » Sun Aug 25, 2013 3:16 am

i am using the command

Every tick >> Sprite >> set angle to mouse.x Mouse.y

and this is great for mouse when using a 8 direction moving over the top game.

i also have my controller working, as long as i disable that one line of code. my question is how to disable that line of code in game if the user wants to use a controller instead?

i have made a Splash screen that makes the user click a box, or press A on gamepad, then the next screen tells the user how to use the controls for what they selected, then the next screen is the game. any help is good, thanks.
B
5
Posts: 33
Reputation: 316

Post » Sun Aug 25, 2013 5:16 am

Create a global variable CONTROLTYPE

Set it based on what the user wants to use then

Compare Variable CONTROLTYPE = "Gamepad"
- Game pad code here as sub events
Else
- Every tick >> Sprite >> set angle to mouse.x Mouse.y

Or something like that.

B
101
S
32
G
11
Posts: 1,552
Reputation: 21,667

Post » Sun Aug 25, 2013 5:25 am

i didn't even think about this! thanks man
B
5
Posts: 33
Reputation: 316


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, shawnzien, tatogame, Yahoo [Bot] and 9 guests