Help, please, I'm lost in the control type variables

  • Hello, I'm blocking again, I want to give my player control to the mouse and keyboard, and also to be able to play the controller, I was explained and I understood that you need control variables type, but I did not understand that it type of variable and I do not know how to go to check if control type, I was explained but I did not understand well, so I thank in advance for your help, it is what type of variable, Boolean? And what are the parameters to check the type control?

  • a simple solution to this is to create a menu before the play game, and give the user a list to select its controllers.

    for example before start game

    list appears with keyboard+mouse | mobile | controller.

    user selects the prefered input and only that controlling code should be active during gameplay.

    if he wants to change controls can go to settings for example (u have to code that), and select other input method.

    this way u avoid saving inputs into variables. u just save a global variable call it controls, and give it value 1 for mouse+keyboard | value 2 for mobile| value 3 for controllers, then on start of game layout if value is 1 then activate group for events used to use the inputs for mouse+keyboard if its 3 then use controllers group input.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much for your help, I understand much better

  • In the parameters of the global variable are a Boolean variable or a number or a character string? Thank you in advance for the answer.

  • In the parameters of the global variable are a Boolean variable or a number or a character string? Thank you in advance for the answer.

    a number or a string it depends how u want to do it, but based on my suggestion would be a number.

    detect input method C3

  • Thank you very much I will listen to your suggestion and study the example you gave me.

  • I tried your suggestion, but I think I didn't understand it well because I have trouble getting there, if you can please look at my project and tell me hou I have to assign the variables, I'm lost, thanks in advance

    dropbox.com/s/0lrrg1xsle5k1pl/FunShooter%20%2817%29.c3p

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