Help with Keyboard troubles
Hi, Just a quick question,
I'm making a whack-a-mole game, in which i am using a mpd16 midi pad control unit as the controller, which is working just fine, the only problem is, if i hold down a button on the pad, it will count as if i've hit that button more than once, so what i need is a way to make it so that (there are 16 buttons on the control pad) if i hit button1, it would then disable button1, until i press another button, the way i have thought about doing it is by having a variable, lets say, "var buttonPressed:int;" now, what i would then do is have the buttonPressed variable set to the buttonCode of the button i have pressed (buttonCode being like keyCode but for the mpd i am using) and then i need some way of saying "if the buttonCode in the variable is not the same as the buttonCode of the next button pressed, do this function" which i cant quite seem to figure out, i know its probably really easy but my mind is completely blank, if anyone could help it would be much appreciated