Tutorial 6: Key Binding
What is Key Binding?
It is allowing people to press keys to do functions, like, add 3 to a variable, or subtract 6, or change a string, things like that
How would I go about Key binding?
1.Bring down the console by pressing F11
2.Type Keys.bind
3.Start a bracket (()
4.Type the key you want to do in quotation marks, as this is a string, like, "a"
5.Type a comma (,)
6.Start a curly bracket ({)
7.Add your action, like, John = 9 (if you want to add more than one action, separate with a semi-colon (;))
8,End your curly bracket (})
9.End your bracket ())
10.Check that you haven't made any mistakes, it should look something like: Keys.bind("a",{John = 9; TX3 = 72})
11.Press enter
NOTE: If you are including a variable in a code, it is advisable to include a semi-colon at the end (;).
Can I have more than 1 action on my key?
You can only have more than 1 action on one key if you enter it at the time of your creation, otherwise your second input will override the first
How would I go about getting rid of this Key binding?
1.Bring down the console by pressing F11
2.Type Keys.unbind
3.Start a bracket (()
4.Type the key you want to remove in quotation marks, as this is a string, like, "a"
5.Type a comma (,)
6.Start another bracket (()
8,End your bracket ())
9.End your bracket ())
10.Check that you haven't made any mistakes, it should look something like: Keys.unbind("a",())
11.Press enter
No hay comentarios:
Publicar un comentario