Quote:
|
In your method you are specifiying what the keys are. What if I were to edit my DEFAULT arrow keys to something like '1, 2, 3 and 4', your method would still be looking for your basic arrow keys
|
Oh, then you could do something like this:
PHP Code:
//#CLIENTSIDE
function GraalControl.onKeyDown(kcode, kstring, scode)
{
for (i = 0; i < 11; i++)
{
if (keydown(i))
{
player.chat = "The player has pressed the" SPC kstring SPC "key which is the default action for" SPC keyname(i);
}
}
}
EDIT: The default controls have keynumber values that range from 0-10 regardless of what key you assign to perform the action, which is why regardless of what keys you press to move your character, the keynumbers for directionals will always be 0, 1, 2, and 3.