I made a code that store all inputs from player 1 and print the input table only when movie ends
Language: lua
local input_count = {
["A"] = 0,
["B"] = 0,
["Down"] = 0,
["L"] = 0,
["Left"] = 0,
["R"] = 0,
["Right"] = 0,
["Select"] = 0,
["Start"] = 0,
["Up"] = 0,
["X"] = 0,
["Y"] = 0
}
while emu.framecount() < movie.length() do
table = movie.getinput(emu.framecount())
if table["P1 A"] then input_count["A"] = input_count["A"] + 1 end
if table["P1 B"] then input_count["B"] = input_count["B"] + 1 end
if table["P1 Down"] then input_count["Down"] = input_count["Down"] + 1 end
if table["P1 L"] then input_count["L"] = input_count["L"] + 1 end
if table["P1 Left"] then input_count["Left"] = input_count["Left"] + 1 end
if table["P1 R"] then input_count["R"] = input_count["R"] + 1 end
if table["P1 Right"] then input_count["Right"] = input_count["Right"] + 1 end
if table["P1 Select"] then input_count["Select"] = input_count["Select"] + 1 end
if table["P1 Start"] then input_count["Start"] = input_count["Start"] + 1 end
if table["P1 Up"] then input_count["Up"] = input_count["Up"] + 1 end
if table["P1 X"] then input_count["X"] = input_count["X"] + 1 end
if table["P1 Y"] then input_count["Y"] = input_count["Y"] + 1 end
if emu.framecount() == movie.length() - 1 then
print(input_count)
end
emu.frameadvance()
end