Post subject: Using Lua script to load a movie
tanzairatier
He/Him
Joined: 3/8/2019
Posts: 1
I'm trying to build a lua script which will load a NES game, and then load a speedrun movie for that game and start playing it. Eventually, I'd like to get a setup where FCEUX is used to randomly pick nes games and also play an associated movie for it in an automated fashion. Anyway, my current hurdle is this: I'm uncertain how to load the movie in fceux via a lua script. I've read the lua functions list and even looked at the source code. I can see there's a method for FCEUI_LoadMovie, but it seems it isn't called via any lua callthroughs. Does anyone know if there's a way to get around this? Or perhaps ask for this to be a feature request? Many thanks in advance.
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
This feature has been added, but is not yet in any official release (the latest one is 2.2.3 currently). However, if you're on Windows, you can use the autobuilds of the development version. The syntax description is: bool movie.play(string filename, [bool read_only, [int pauseframe]]) (aliases are movie.load or movie.playback) Loads and plays a movie from the directory relative to the Lua script or from the absolute path. If read_only is true, the movie will be loaded in read-only mode. The default is read+write. A pauseframe can be specified, which controls which frame will auto-pause the movie. By default, this is off. A true value is returned if the movie loaded correctly.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)