![]() |
onKeyPressed()
PHP Code:
|
You could get them with something like this:
PHP Code:
|
oh good idea xD
|
you could also use....
PHP Code:
|
PHP Code:
|
Quote:
|
Quote:
|
Quote:
That's a bit vague for someone that might not be familiar with loops since they wouldn't realize that they would benefit from using one in this case: PHP Code:
Stuff like this has been posted before, possibly in multiple threads, people should really use the search function, they would get answers to their questions much faster. EDIT: It's probably better to say 'directional key pressed' instead of 'arrow key pressed' since that would imply that the script would only trigger when you press an arrow key, when in fact it would trigger whenever you pressed any of the directional keys that you have set in your F3 options. |
Quote:
As for arrows vs directional... probably, but it should always be applied to the customization of the player. If the player chooses to use WASD as their directional keys, this should also apply to whatever GUI's the player is using, so really directional translates into arrow as the player customizes them to basically be such(even if they're regular keys instead of the arrow keys). Developers need to keep that in mind. |
It would be better if Stefan would provide a variable for which keys are used for movement/other stuff.
It's silly and redundant to have an event that passes paramaters, only to then have to call another function to see if a key is pressed, but I guess that's Graal. |
Quote:
|
Quote:
|
Found Out The arrowkeys xD yesterday night its 38-40 xD
|
Quote:
0-3 using keydown() |
Quote:
|
What're you trying to do? If you're wanting for it to operate with Graals origional keys (those that you can change using the 'F3/Change Keys' option) you'll need to use keydown(variable).
Here's a couple of examples to show this HTML Code:
function onKeyPressed() { HTML Code:
function onKeyPressed() { 0, 1, 2 & 3 are all movement keys 4 is 'A' 5 is 'S' 6 is 'D' 7 is the map key [default- 'M'] 8 is the tab key (chat toggle) 9 is the inventory [default- 'Q'] 10 is for pausing [default- 'P'] Hope this helps. |
All times are GMT +2. The time now is 12:11 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.