mIRC Home    About    Download    Register    News    Help

Print Thread
#88124 25/06/04 12:48 PM
Joined: Jun 2004
Posts: 2
R
R2O Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
R
Joined: Jun 2004
Posts: 2
I have a ...strange problem. I am making a game in mIRC with picture windows and I use $keyrpt to check if a button is repeating. But... When the user presses another key (when the first key is still pressed down) then $keyrpt (for the first key) is interupted and returns $false. (After all this is the logical thing to do smirk ) Here is my problem: Is there anyway to set $keyrpt again to $true ? Because the key that fired up $keyrpt is still pressed... I use on keydown a lot to check the keys and I understand that the answer I am looking for is against the ...proper use of $keyrpt.

Thank you in advance grin

Well there is the obvious solution... Let go the first key and press it again so $keyrpt for that key is $true again... But as I said in the main post this key is pressed down all the time and it gets frustrating to lift your finger and press again.

Last edited by R2O; 25/06/04 01:42 PM.

-=- I think that you think that I dont think that you shoud think... :tongue: -=-
#88125 26/06/04 01:31 PM
Joined: Dec 2002
Posts: 208
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 208
there is no solution i can think of

all i know is that no aplication that i know of works like that .. even in windows if u openup notepad or any other text editor .. and hold down one leter, then hit any other leter while still holding down the first ... the first one stops and does not start again unless you unpress and repress the key

and beings mIRC is probably (i'm guessing, i dont know for sure) geting its information from windows, and windows works that way ...

the solution is to change the way your game works .. because no other game i know of work that way either .. so how do they do it ?

if there is a solution .. it probably involves useing a dll or something .. but i dont know it

sorry i wasnt more help,

Cobra^

#88126 26/06/04 02:34 PM
Joined: Jun 2004
Posts: 2
R
R2O Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
R
Joined: Jun 2004
Posts: 2
Yes you are right. And thank you smirk


-=- I think that you think that I dont think that you shoud think... :tongue: -=-
#88127 27/06/04 12:21 AM
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
OK, I will caveat this by saying that I am not an expert in this sort of coding, and even less so by using Java.

However, I understand that Java allows for the events of KeyPressed, Key Typed and KeyReleased. Thus, the coding may want to look for key-release as the main event?

I think the answer would depend on what language you use for coding the input in - perhaps your own DLL?

Cheers,
DK


Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!

Link Copied to Clipboard