I am having a little dilemma with the Lua scripting object.
I am trying to make a dialogue engine that reads the dialogue from a lua file.
Here is an example of what part of the file would look like:
function intro() {
startTalk();
setName("Bob");
setAvatar("bob.png");
speak("Hi, i'm Bob. This is the first line of text");
speak("This is the second line of text. Blah blah blah.");
speak("Yep, you guessed it. This is the third line.");
speak("Goodbye.");
endTalk();
}
Now I want mmf to interpret these functions so that the avatar and name etc can be changed. Here is the problem that I face though: when "speak" is called, I don't want the "intro" function to continue, I want it to pause on that line of dialogue. I'm not sure how to pause the function, or if there is any other way of solving this problem.
I hope what i have written is clear enough , and any suggestions would be much appreciated .
Oh and if you read this Ben F, this is your fault
Thanks !
You could make a function speak(text) that does a DoCall, and then waits for a response from the program before closing the function. I haven't used the Lua object enough to know how to do that though =/