2
$\begingroup$

Lets say I have W binded to walk forward. What if a user is, well, left-handed (example), and uses another key? There is a way to change this but it is way too long and absurd. What is the best way to let a bind be changed? Thanks.

$\endgroup$
5
  • $\begingroup$ i'm left handed and i use w $\endgroup$
    – ruckus
    Commented May 24, 2015 at 1:36
  • 1
    $\begingroup$ Yes,a friend of mine plays with wasd also.But what do you mean too long ? You can just swap w with "up arrow" in the logic brick. $\endgroup$
    – Lev
    Commented May 24, 2015 at 1:44
  • 1
    $\begingroup$ Well, im not saying left handed people. For me, i'm right handed but I like to be unique and I have a really complex setup... $\endgroup$
    – blackhole
    Commented May 24, 2015 at 18:05
  • $\begingroup$ @Lev please explain. $\endgroup$
    – blackhole
    Commented May 26, 2015 at 7:31
  • $\begingroup$ Do you want your character to move with let's say "up arrow" instead of "w". Just go to the keyboard sensor and change the key from "w" to "up arrow". If you want to change this while in game, you use bge.events to change it. I will write you an example if this is what you want, but I am having difficulty to understand what you want. $\endgroup$
    – Lev
    Commented May 26, 2015 at 9:40

1 Answer 1

2
$\begingroup$

Well in case what you asked for was changing the keys in game, here is a blend file and a picture : change_key picture

Here the cube moves in the x-axis by pressing "w". But if you press "s" the script will run and the cube's movement key will change to "up arrow"(this is the number 146, it is an event). Here you can find all the numbers for all the keys.

$\endgroup$
4
  • $\begingroup$ OK, seems fine. But what if there is a text box, would everything change? And how can a user change a key to whatever he wants? $\endgroup$
    – blackhole
    Commented May 26, 2015 at 19:47
  • $\begingroup$ I am trying my best to come up with a way where you can have a menu that shows all the things you can do (e.g. walk, crouch...) and have a box next to it where you get to write any key you want. $\endgroup$
    – blackhole
    Commented May 26, 2015 at 19:54
  • $\begingroup$ That is an interface issue. What you are trying to do is to create a "controls-menu".Create a new thread, and ask precisely what you want. Put a couple examples there also.My answer covered the basic mechanics to what you asked. $\endgroup$
    – Lev
    Commented May 26, 2015 at 20:36
  • $\begingroup$ Fine, take the points heh. Nah, im joking. $\endgroup$
    – blackhole
    Commented May 26, 2015 at 20:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .