Is it possible to create a timer in lua based on the number of frames elapsed or on the number of frames per second of the emulation? (Bizhawk)
For example for Night Trap, there is here the solution "The Perfect Game - 83 moves in total", this one is based on the in-game time. It might be necessary to count down then remove the time from the intro of the Sega Mega-CD and from the intro to this timer.
Not sure I understand exactly what you mean but I think you can use
Language: lua
while emu.framecount() < number do
emu.frameadvance();
end;
to reach a certain point and use
Language: lua
for i=1,number do
emu.frameadvance();
end;
to advance a certain number of frames.
For exemple :
Language: lua
number=1200;
number2=60;
while true do
while emu.framecount() < number do
emu.frameadvance();
end;
client.pause();
for i=1,number2 do
emu.frameadvance();
end;
client.pause();
end;
would advance to frame 1200, then pause, then advance 60 frames and pause again. You can of course put any code you want instead of pause.