Sign in to follow this  

custom input setting for user

Recommended Posts

Hi, I am trying to make a menu which lets the user bind the in-game inputs. But I have no idea how to do that... Maybe there is a way to detect which input he presses and then use this information when creating input...

Thanks beforehand.

Share this post

Link to post
Share on other sites


I would do something like that :

-> set a callback to the "onkeypress" event, this function will detect which key was pressed and then call the associated action
-> in the user cookies, make a hash keycode=>event (eg: A is 'move_left')
-> then in your callback function when you detect A you know that the user wants to 'move_left'

of course when your user want to change his bindings you have to change the cookie too

Hope it helps

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.