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.
$\begingroup$
$\endgroup$
5
-
$\begingroup$ i'm left handed and i use w $\endgroup$– ruckusCommented 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$– LevCommented 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$– blackholeCommented May 24, 2015 at 18:05
-
$\begingroup$ @Lev please explain. $\endgroup$– blackholeCommented 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$– LevCommented May 26, 2015 at 9:40
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
4
Well in case what you asked for was changing the keys in game, here is a blend file and a 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.
-
$\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$ 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$ 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$– LevCommented May 26, 2015 at 20:36
-
$\begingroup$ Fine, take the points heh. Nah, im joking. $\endgroup$ Commented May 26, 2015 at 20:41