Creation/Dev/Script/Functions/keydown

From Graal Bible
Revision as of 03:28, 25 July 2010 by Fowlplay4 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Clientside

Description

Used to check which key a player has held down.

example:

function onKeyPressed()
{
  if (keydown(5))
  {
    player.chat = "You pressed s";
  }
}

Checks if the player presses the default sword key.

Notes

Joysticks only work with keydown, not keydown2.

Value Description
0 up
1 left
2 down
3 right
4 d (Weapon)
5 s (Sword)
6 a (Grab)
7 m (Map)
8 TAB (Chat Bar Toggle)
9 q (Inventory)
10 p (Pause)