From f7bce819be17ac01cc4328d6ca7ce99f3b52ff3f Mon Sep 17 00:00:00 2001 From: fatratknight Date: Thu, 17 Sep 2009 03:17:16 +0000 Subject: [PATCH] Added a threshold so that it doesn't instantly detect the next button press. Timing could be tweaked. --- output/luaScripts/PunchOutTraining.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/output/luaScripts/PunchOutTraining.lua b/output/luaScripts/PunchOutTraining.lua index ffbc6228..007c6f96 100644 --- a/output/luaScripts/PunchOutTraining.lua +++ b/output/luaScripts/PunchOutTraining.lua @@ -6,6 +6,7 @@ local EHP= 0x0398 -- Enemy HP address local TMR= 23 -- Frames in advance for your punches. local BND= -8 -- KEEP NEGATIVE!! Frames after the golden zone. +local threshold= 15-- How many frames before the target timing does it allow? local DISPx= 180 local DISPy= 180 @@ -52,7 +53,7 @@ while true do EnemyHP= memory.readbyte(EHP) gui.text(144,22,EnemyHP) - if IsPress() then + if IsPress() and LastHit <= threshold then HitTiming= LastHit LastHit= BND-1 timer= -18