Hmm onKeyPressed can be called over and over if you hold down the key I believe. If you don't want the brief wait after first key strike then you'll have to do some sort of timeout loop detecting if the key is pressed. This can be done by doing
PHP Code:
function onTimeout() {
if (keydown2(getkeycode("g"), true)) {
this.fire ++;
}
setTimer(0.1);
}
Or similar. "this.fire" would increase while G is pressed.