HTML Code:
function onKeyPressed() {
for (temp.k = 0; temp.k < 4; temp.k++;) {
if (!keydown(temp.k)) continue;
this.("dash_" @ temp.k)++;
if (this.("dash_" @ temp.k) => 2) {
player.chat = "Doing Dash!" SPC this.("dash_" @ temp.k);
}
//Clear the attempt... this.("dash_" @ temp.k) = null;
scheduleevent(0.1, "onResetDash", temp.k);
break;
}
}
Should work, but the onKeyPressed is being sent about 30 times during this procedure.... x-x