Detection Method for various inputs

Get help using Construct 2

Post » Tue Mar 19, 2013 11:54 am



Ok gang, I've played around several methods trying to figure out a way to detect what a player is using when they start my game. I've already setup 3 control methods: Keyboard, Touch, & Gamepad. However, I want to make it so when it detects a player is using a Gamepad/Keyboard then my on screen touch controls will be invisible/inactive.

I've learned how deactivate those groups when a player is using one or the other, but I don't know how to make my on screen controls invisible/deactivate. My on screen arrows are separate objects, I don't know if this is the problem or not??
B
9
S
2
G
3
Posts: 49
Reputation: 2,155

Post » Tue Mar 19, 2013 2:37 pm

Currently doing this myself.

I set up a layer and an individual event sheet just for tracking what the player is using.
I used a basic text object to inform the user to "press any key"
In the event sheet if this is running through coccoonJS then the text changes to "Touch to start"
If a Controller is plugged in or active the text display will change to "press A to start"

Edit*
If you want I'll rip my startup page from my game and give you the capx to view.Richard Stennett2013-03-19 14:38:58
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Tue Mar 19, 2013 2:40 pm

Yeah, I did a bootleg method which works by deactivating groups depending on input. The only problem is I can't make my on-screen controls disappear once you use a keyboard or gamepad.
B
9
S
2
G
3
Posts: 49
Reputation: 2,155

Post » Tue Mar 19, 2013 2:42 pm


Yeah, if you don't mind linking me to the capx. I can study it and learn from it.
B
9
S
2
G
3
Posts: 49
Reputation: 2,155

Post » Tue Mar 19, 2013 3:05 pm

https://dl.dropbox.com/u/74175978/Menu_Controls.capx

Let me know when you've downloaded it so I can remove it from my public folder please :)
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Tue Mar 19, 2013 3:08 pm


Ok won't be until later today I'm at work. I'm operating on Eastern Standard Time...time here is 1107AM wont' be home until 330PM
B
9
S
2
G
3
Posts: 49
Reputation: 2,155

Post » Tue Mar 19, 2013 3:09 pm

4 hours or so, no worries, thats 7.30pm here. I'll take the link down at 4pm your time :)
Any issues or help just let me know
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Tue Mar 19, 2013 8:25 pm

I just downloaded it to take a look at it
B
9
S
2
G
3
Posts: 49
Reputation: 2,155

Post » Tue Mar 19, 2013 10:40 pm

On the title screen, if the user presses a keyboard key, clicks the mouse or presses a gamepad button, set a global variable 'hideTouchControls' to 1. If the global variable is 1, make the touch control objects invisible!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Tue Mar 19, 2013 11:11 pm

[QUOTE=Ashley] On the title screen, if the user presses a keyboard key, clicks the mouse or presses a gamepad button, set a global variable 'hideTouchControls' to 1. If the global variable is 1, make the touch control objects invisible![/QUOTE]

This is what I've been trying to figure out haha I will see if I can get that to work
B
9
S
2
G
3
Posts: 49
Reputation: 2,155

Next

Return to How do I....?

Who is online

Users browsing this forum: Colludium and 30 guests