i created tool that generate lua script on each level which contain lot function, and they named based on the object+id format. ex : trigger1(), etc; so every level may have same function name, what i need is call luaL_dofile on beginning level load.(+ registration ofcourse)
on game every level load i call do_file this lua script, so i can call it in the code. the thing is, when i try to change level to another level, i dont want close entire lua state and do rereigistration / initialization ,i just want close previous luaL_dofile and change it with new luaL_dofile on the next lua level script. since i want instaneous transition each level.
can anyone help me on this ?