Yes, there is a way. If your using the KeyDown event, just use a variable
Click variables, add, and make a variable called Keys. Click Array, click yes. Now however many keys you are using for the controls, put that number in the box + 1, so say your using like, 5 keys. you'd put 6 in the box. Now click okay, open up Notepad and write this down
Keys[0] = L (Or what ever key your using)
Keys[1] = A
Keys[2] = Etc...
Now, your almost done!
before the code for your keydown event, make an if statement.
- Code: Select all
If (Keys[0]==0) { //Your key was L in this case, as seen above
YOUR_CODE_HERE
}
Put the } at the very bottom of all of the code.
Now to disable and re-enabel that key, all you gotta do is call the variable. Example:
- Code: Select all
//disable the key
Keys[0]=1;
//Enable the key
Keys[0]=0;
hope this helped