Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function initLag()
- for i=1,movie.length() do
- j = movie.getinput(i-1, 1)
- if (j["Left"] or j["Right"]) then
- tastudio.setlag(i, false)
- for lags=1,12 do
- tastudio.setlag(i+lags, true)
- end
- elseif (j["Up"] or j["Down"]) then
- tastudio.setlag(i, false)
- for lags=1,13 do
- tastudio.setlag(i+lags, true)
- end
- end
- end
- end
- --this function should mark all the appropriate lag frames without having to play through the run. not fully tested
- --initLag()
- while true do
- isLagged = false
- if (not tastudio.islag(emu.framecount()-14)) then
- j = movie.getinput(emu.framecount()-14, 1)
- if (j["Up"] or j["Down"]) then
- tastudio.setlag(emu.framecount(), true)
- isLagged = true
- end
- end
- if (not isLagged) then
- for i=emu.framecount()-13,emu.framecount()-2 do
- j = movie.getinput(i, 1)
- if (not tastudio.islag(i)) then
- if (j["Left"] or j["Right"] or j["Up"] or j["Down"]) then
- tastudio.setlag(emu.framecount(), true)
- isLagged = true
- end
- end
- end
- end
- --this could print in the console when it finds a wait frame, but it's easier to just look
- --[[j = movie.getinput(emu.framecount()-1,1)
- if (not isLagged and not (j["Left"] or j["Right"] or j["Up"] or j["Down"])) then
- print(j)
- end]]
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement