Excellent work, Tommy - I was holding off buying BlitzMax because I needed scripting language support, but John Pickford and someone else pointed me here on another forum so Mark's got you to thank for another sale!
Cheers! The scriptengine needs a little more work but you can do pretty much all the LUA scripting via BMX now.
The problem I had integrating Lua when I used it with C was getting it to be able to run several scripts at once in a kinda multitasking way - I could never get my head around how to do it. It's a big job, but do you plan to tackle it? If not I may be looking at degenerating into a dribbling wreck again trying to get it working... ;)
Okay what you could do is create a ScriptEngine object for each enemy or task or whatever. Because each instance has it's own lua_state, each scriptengine is isolated from the other, in theory you could tackle your problem. You could even attach the scriptengine instances to actual instances of enemies or AI agents and have each script interact with each unit privately etc.
Hope that makes some sort of sense...