The Daily Click ::. Forums ::. Klik Coding Help ::. Lua Dilemma O
 

Post Reply  Post Oekaki 
 

Posted By Message

-Adam McMillan-

Mr Incredibubble

Registered
  15/09/2008
Points
  198

Wii Owner
22nd October, 2008 at 09:05:00 -

Hi all,

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 !

Image Edited by the Author.

 
Image

X_Sheep

I had a custom rating before it was cool

Registered
  01/03/2004
Points
  1313

VIP MemberPicture Me This -Round 23- Winner!Dos Rules!
22nd October, 2008 at 17:04:44 -

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 =/

Image Edited by the Author.

 
a/n

-Adam McMillan-

Mr Incredibubble

Registered
  15/09/2008
Points
  198

Wii Owner
22nd October, 2008 at 21:45:49 -

Yeah easier said than done but thanks

 
Image
   

Post Reply



 



Advertisement

Worth A Click