Detection Method for various inputs

  • 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??

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • Yeah, if you don't mind linking me to the capx. I can study it and learn from it.

  • 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 :)

  • 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

  • 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

  • I just downloaded it to take a look at it

  • 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!

  • 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!

    This is what I've been trying to figure out haha I will see if I can get that to work

  • OK Ashley I've tried several things, but I'm almost burned out trying to figure out this input detection. I'm new to this so the variable thing sounds cool, I just don't know how to input that to make it flow.

  • jbrown2177

    If you look at the capx I sent you there is a variable that is detecting which controller method is being used (Pad, Keys or Touch).

    If that variable = Touch then set a layer to visible (This layer should contain all your touch buttons)

    If that variable "Does not" = Touch then set a layer to invisable

  • Thanks, I figured it out last night, but I guess I was starting to get tunnel vision again. I created a variable and placed the variable to make the control layer appear when the touch action was triggered. But I will go back and look at your example again.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)