How do I make custom changable controlls ?

0 favourites
  • 8 posts
From the Asset Store
Supports keyboard, mouse and gamepads. Supports several gamepads at once.
  • Hi guys, how can I change my controlls in the game and save them ?

    Thanks:)

  • Hi there,

    Can you be more specific about what you want to accomplish?

  • for example: if the defaoult are the arrows...but i like to change them and save the controlls to asdw keys...

  • The expression Keyboard.LastKeyCode will give you the code for that key. So make a interface and let the user press keys.

    Store that code a variables, in a dictionary, in an array, in a list .... whats best for you.

    Use Local Storage Object.

    Keyboard.StringFromKeyCode(Keyboard.LastKeyCode) will give you a key as a string. Use that to show the user what he has pressed.

    If you do this, you wil have to use the conditions 'Key code is down', 'On key code pressed' and 'On key code released' solutions, and compare them with you variables.

  • for example: if the defaoult are the arrows...but i like to change them and save the controlls to asdw keys...

    Well if the question is only: how do i use other keys then de default keys ...

    See here:

  • thanks a lot... I need the storage/change key thing...since I am not good in coding... I would ask u gently to show me a simple capx file if that is ok 4 U. You would really save me !

    thanks so much ! I searched 3 days long... U R my hope to achieve that hard thing for me

  • Do you have a game to go with it ?

    https://

    drive.google.com/open?id=0B1SSuCVV8v74SnBseHRpUXRfSEU

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • WOOOOOWWWWWWWWWWWWWWW that was amazingly kind ! THANK U SO MUCH !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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