Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --movement lag counter by ThunderAxe31 for GBC E Mo Dao (Devil Island)
- --does automatically clear the count when you load a state.
- levelx_addr = 0xC122
- last_levelx = -1
- levelx_lagcount = 0
- framecount = -1
- while true do
- if framecount ~= (emu.framecount()-1) then --if a state has been loaded, reset values
- levelx_lagcount = 0
- last_levelx = -1
- end
- if (last_levelx > -1) and (last_levelx == memory.read_u8(levelx_addr)) then --checks if the x value is unchanged
- levelx_lagcount = levelx_lagcount + 1 --updates the movement lag count
- end
- gui.pixelText(88, 0, levelx_lagcount, "red")
- last_levelx = memory.read_u8(levelx_addr) --updates the x value
- framecount = emu.framecount() --updates the frame count
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement