![]() |
arrow keys
Stefan, why don't you add keycodes for the arrow keys. Because the keydowns(0..3) just check for the specified key (so if they change it to j,k,l,o, then it will check those if i use keydown(0..3)
|
I doubt Stefan added the keycodes...they are those used by the BIOS/Windows. Just look in some table for the keycodes for the arrow keys.
Here, I found those in the header file of a DOS game programming library (Allegro): NPC Code: I didn't test them though. |
Ok, they were wrong. I needed to write a windows program to get the right ones. Here they are:
up - 38 left - 37 down - 40 right - 39 Graal isn't triggering a keypressed event though. You need to check it in timeouts. |
that isnt standard ASCII code though, so it wouldnt do anything with keydown2
|
I've had arrow keys work with keydown2 before.
|
bah :P never worked for me
|
Quote:
NPC Code: |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Kai:
That is true, however, as I understand it keypressed is far more efficient. |
Quote:
|
Quote:
If you already need to use a timeout loop for something else... just add the key checks to it... If you don't have any timeouts... don't bother with one. Just use keypressed... |
| All times are GMT +2. The time now is 07:13 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.