My game is in C++ and I want to make AI being managed by lua scripts, but I have no idea how should the scripts look like and the integration in C++.
Should the script be like
if (whatever_happening) do_something
if (....) .....
etc
And in every frame in C++ I should call for every enemy:
foreach(enemy)
enemy.handleAi(luascript.file)
Or it is wrong and I should handle it different?