Please forgive this REALLY NOOB question. But the first bunch of search hits (Bing,google) point me here so I'll ask. How do I use LUA scripting with Bizhawk?
I read this:
http://tasvideos.org/LuaScripting.html
but it's more of a manual and unfortunately I could not find a REALLY BASIC tut on youtube. I downloaded bizhawk and got it to run with a bunch of roms. I also got LUA running and have written some basic LUA scripts, but nothing that runs *inside* of another program or game. So for example I put the Super Mario World ROM inside the SNES folder in the bizhawk folder. I start EmuHawk and I go to Tools>LUA console. I open the script in the folder Bizhawk>LUA>SNES named super mario world. I get an error in the output window
Error: NullHawk does not implement memory domains
Unable to find domain: CARTROM
Error: NullHawk does not implement memory domains
LuaInterface.LuaScriptException: 148
OK so I forgot to start the game. I start it and it's running nicely (music too!)
Now I reload the script and it's state is active. I'm still at the opening mario screen.
Maybe I have to start the game?
I hit return three times and there is Mario standing in front of his house. The L and R keys move him. The Z key selects my choice. He is STILL standing there - in a garden but now I see a little blue box around him.
I would like to understand what the script is doing but of course it is 245 lines long.
In the script are a bunch of what look like local variables being assigned memory addresses? 6 character hex digits. Then
memory.usememorydomain("CARTROM")
Then a bunch of local functions are defined
mario()
projectiles()
objects()
invulns()
then the main loop
while true do
mario()
objects()
invulns()
projectiles()
emu.frameadvance()
end
So basically this script draws a box around the active objects in this game?