ChangeKey
void ChangeKey(string name, [int input], [bool mouseAx], [bool mouseBut], [bool joyAx], [bool joyBut], [bool keyb]) void ChangeKey(int index, [int input], [bool mouseAx], [bool mouseBut], [bool joyAx], [bool joyBut], [bool keyb]) void ChangeKey(string name, [string primary], [string secondary], [string primaryModifier], [string secondaryModifier])
Parameters
name: The name/description of the action
you wish to change.
index: The index number of the action
you wish to change. Useful for custom GUIs.
input: Which input to change. 1 for primary. 2 for secondary. Defaults to 1
.
mouseAx: Allow mouse axes for input? Defaults to false
.
mouseBut: Allow mouse buttons for input? Defaults to true
.
joyAx: Allow gamepad axes (analog sticks/buttons) for input? Defaults to true
.
joyBut: Allow gamepad buttons for input? Defaults to true
.
keyb: Allow keyboard buttons for input? Defaults to true
.
Description
Waits for player input, then assigns that input to trigger this action
. All inputs are monitored by default except mouse axes. All arguments except name
or index
are optional and will use their default values if not explicitly passed in.
Note that you can also use ChangeKey()
in the same way as SetKey()
to change an action immediately via script instead of waiting for player input.
Example
Last updated