![]() |
Keydown
Does anyone know the keydowns for a,s,d,up,down,left, and right?
|
Also how do you use keydowns?
|
Keydowns... aight, here goes...
up= 0 left = 1 down = 2 right = 3 D = 4 S = 5 A = 6 Basically, it checks to see if the player is pressing the key or not. Example: NPC Code: That was sorta bad, but it works something like that (9 is Q by the way). That's somewhat similar to this menu thing I made, and probably similar to all those other menus out there. |
Hmm for me keydowns only work when part of a timeout loop.
|
Umnn what about "R"?????
|
Quote:
Wrong! Keydown works wherever you use it - the only problem comes when people fail to understand that it is a function rather than an event. This "Sennema" person seems to make that mistake too. And no, you cannot use R. [/Kaimetsu] |
OOO! R is a great keydown to add to my list of keydowns we MUST have!
-=List of Keydowns we MUST have=- DELETE R -=End List of Keydowns we MUST have=- |
[screen_name says:]
kai, i didnt know that, but the only way i can seem to get keydown to work is in a timeout loop too |
Quote:
Well, it all very much depends on what you mean by "work". The function will, at pretty much any time, return the state of the specified key. Whether or not you use this in any useful way (which usually implies a timeout) is your own concern. [/Kaimetsu] |
babylon combines "playerendsreading" and "keydown()" to make a nice sign menu
|
here is an example of one I made on the spur of the moment, it kinda sucks though
NPC Code: |
Quote:
I'll give you the benefit of the doubt and assume that you'd never normally use flags for such things. [/Kaimetsu] |
crazy kai
|
I hate flags. :(
I remember when i always used them, for everything. I didn't know about this.vars ;) |
does anyone use the save slots for the npcs anymore??
|
Quote:
|
They've worked without timeouts before for me. Not overly well, but they did work. But it's been awhile since I've used them without a timeout loop.
|
Quote:
|
Quote:
Although I have to say that I, personally, prefer using the new string arrays. |
Quote:
I haven't used the string arrays much yet. I should probably go experiment with them sometime soon. |
man i love the string arrays
i dont know if stefan was planning on putting those in, but i sent him a email about them b4 they came out, but they sure are a lot easier to use |
String arrays = <3
(so would R and DELETE as future keydowns) |
| All times are GMT +2. The time now is 01:32 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.