These three
accept the following strings for buttons:
-
nort: North/Up -
sout: South/Down -
west: West/Left -
east: East/Right -
fire: Button used for shooting (default: left mouse button) -
spec: Button used for active ability (default: right mouse button) -
swap: Button used to swap weapons (default: space; mouse wheel) -
prev: Mouse wheel up -
next: Mouse wheel down -
pick: Button used to pick up weapons (default: E) -
paus: Button used to pause the game (default: P; Esc) -
okay: Button used to confirm actions in menu (default: Enter) -
exit: Button used to close menus (default: Esc) -
horn: Button used for airhorn[.wav] (default: B) -
talk: Not an actual button - returns whether the player has chat open. -
key1..key9,key0: Pick N-th mutation
The first 6 keys are also used for emotes in multiplayer.
So, for example, if you wanted to display a chat message whenever any player presses the airhorn button, you could do
with (Player) if (button_pressed(index, "horn")) { trace("P" + string(index + 1) + " pressed airhorn!"); }