I am trying to implement the same kind of design as anyone who has successfully scripted a game without using lua as a config/callback file. I would like the functionality as follows:
in "EventIncountered.lua"
1 moveToPoint(500, 500)
2 --returns here when moving is done.
3
4 dance()
5 --return here when done dancing etc...
In the player class of my game I would like to have these functions update the fields that the player's position, animation etc... is a adjusted by every update frame. Then, when the desired state of the player is reached, the lua file should continue where it left off. I know it can be done and similar questions have been asked;however, all I have learned from them is how to use lua as a configuration file to read and call callback functions from on certain events(I even know of one question in which the person asking the question knew how to do this but was asking a higher level question about it). I know there is someone out there there who would be willing to share this well guarded secret.