Thread: keypressed
View Single Post
  #5  
Old 04-04-2002, 12:16 PM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Quote:
Originally posted by amonrabr
¬¬'' ..no comments...


Keypressed you have to RELEASE the key!!!

try this script and u will understand..
timeout=.05;
if (keydown(5)&&this.mode==0){this.mode=1}
if (keydown(5)&&this.mode==1){this.mode=0}
if (this.mode==1){setplayerprop #c,1;}else setplayerprop #c,2;

I wanna press S and say 1.. if I press S again say 2.. but the timeout is too fast and will be showing {1,2,1,2,1,2,1,2,1... very fast}..
There is an easy way to do release keys..

setarray this.key,10;
setarray this.oldkey,10;
for (i=0;i<10;i++)
{this.key[i]=this.oldkey[i];
this.oldkey[i]=keydown(i);}

¬¬'' Did u get now???
Did u see somewhere menus where you press D to open, S to the first choise and A to the second choise? the guy that made it didnt know the script that I said..
I understand now. Need to explain more thorough next time . Can't you withdo with what we have already...? I think what we have now is enough rather than a keypress.
Reply With Quote