User File #36385002662688000

Upload All User Files

#36385002662688000 (unlisted) - lag

Kirby's Adventure.lua
22 downloads
Uploaded 1/16/2017 2:11 PM by TASeditor (see all 188)

    local lagged = false
     
    local function DetectLag()
            local LagFlag = memory.read_u8(0x01a5)
            if LagFlag == 1 then lagged = true
            else lagged = false
            end
    end
     
    local function SetLag()
            if lagged then tastudio.setlag(emu.framecount(),true);
            else tastudio.setlag(emu.framecount(),false);
            end
    end

--event.onmemoryexecute(DetectLag, 0xC373)
--event.onmemoryexecute(SetLag, 0xC323)
while (true) do
DetectLag()
SetLag()
--tastudio.setlag(emu.framecount(),true);
emu.frameadvance()

end