while i was porting an game from the cfx (for the contest) i found that disgusting thing:
Try the program
Local k
0=>k
While k<>12 'it's k not equal 12
GetKey k
Cls
Text 1,1,k
WhileEnd
Start it and hold(!) any key (except [clear] - it stops the program). Look closely to the values.
:/ It prints something like x, 0, 0, x, x, x,0,x,0,x,0,0,x,... (where x is the key-number) :/
the only thing you can do is to say to the user to release the key and press it in an high frequency.
when the user then has the frequency the program checks the key-number the program will
always get x (when he/she/it presses the key short time before the program checks the number) or 0 (when he/she/it presses the key short time after the program checks the number)
or - another way - is the slow down the program with wait but this is not the correct way. :/
disgusting...
Started by
mkanter
, Feb 21 2004 12:11 PM
5 replies to this topic
#1
Posted 21 February 2004 - 12:11 PM
#2
Posted 21 February 2004 - 01:53 PM
ive already complained... the best way at the moment is to do a tight loop to get the key value and not allow 0.
#3
Posted 21 February 2004 - 05:15 PM
that's the problem: 0 is allowed (the program have to do calculation then too)
The way I do it now is to check the key again, if 0 was the first key (there may be an better way to do this)
GetKey k
If k=0
Then
GetKey k
IfEnd
(For the thing I need it it works - but what's when an os update corrects this? Let's see... )
Another thing (don't know if already known) is that an custom ending screen is not displayed when you switch the classpad off from eactivity-editor.
The way I do it now is to check the key again, if 0 was the first key (there may be an better way to do this)
GetKey k
If k=0
Then
GetKey k
IfEnd
(For the thing I need it it works - but what's when an os update corrects this? Let's see... )
Another thing (don't know if already known) is that an custom ending screen is not displayed when you switch the classpad off from eactivity-editor.
#4
Posted 21 February 2004 - 05:28 PM
knew that already (dont know why it happens).
the best way to do getkey right now is:
Do
GetKey k
lpWhile k=0
the best way to do getkey right now is:
Do
GetKey k
lpWhile k=0
#5
Posted 21 February 2004 - 10:12 PM
That's the way i've been doing itDo
GetKey k
lpWhile k=0
#6
Posted 21 February 2004 - 11:10 PM
i'll have something to say next week, cant say what yet (i dont know all the info, etc). it should be good news.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users