Lock script input for 10 frames after each script to prevent rapid fire
@@ -6,11 +6,17 @@ UBYTE joy;
UBYTE last_joy;
UBYTE recent_joy;
UBYTE await_input;
+UBYTE input_wait;
BankPtr input_script_ptrs[NUM_INPUTS] = {{0}};
void HandleInputScripts() {
UBYTE input_index, input_joy;
+ if(input_wait != 0) {
+ input_wait--;
+ return;
+ }
+
if (!script_ctxs[0].script_ptr_bank && joy != 0 && joy != last_joy) {
input_index = 0;
input_joy = joy;
@@ -18,6 +24,7 @@ void HandleInputScripts() {
if (input_joy & 1) {
if (input_script_ptrs[input_index].bank) {
last_joy = joy;
+ input_wait = 10;
ScriptStartBg(&input_script_ptrs[input_index], 255);
return;
}
