Selecting Dialog?

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Selecting Dialog?

Postby Lina820 » Fri Jan 25, 2008 10:31 pm

I wanted to know if it's possible for a character in the game to ask the character your playing as a question?

example:

person: Do you want tea?

You: Yes or No (you'd be able to chose between the two)

person: depending on your answer will say something else.

So I ask what I'm asking is can you give the player the option to chose what they say and if so how?
Lina820
Junior Member
 
Posts: 8
Joined: Tue Jan 22, 2008 1:08 am

Postby Mystery » Fri Jan 25, 2008 10:41 pm

A multiple choice dialogue system has been a topic/wish for a couple of users already, unfortunately it's not implemented in the current version of AM.
With the dialogue wizard, you can create answer-question sequences without multiple choice. :(
There may be some ways for experienced users to create something with scripting, but there is no generally available information about it either...

I hope that such a feature will be considered for future updates of AM :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby Lina820 » Fri Jan 25, 2008 10:47 pm

Thanks Mystery. I hope it comes out soon, it'd be really helpful.
Lina820
Junior Member
 
Posts: 8
Joined: Tue Jan 22, 2008 1:08 am

Postby Mystery » Fri Jan 25, 2008 10:49 pm

I agree with you, I would love to see such a feature in AM, too! :D
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby Candle » Sat Jan 26, 2008 1:07 am

You can use a dialog box with the yes or no and go the frame with the yes or no button.
Please don't PM me questions, ask here in the forums!
``````````````
Between grand theft and a legal fee, there only stands a law degree.
User avatar
Candle
Administrator
 
Posts: 3077
Joined: Sat Feb 07, 2004 2:21 am
Location: Rudy's Bar

Postby Lina820 » Sat Jan 26, 2008 5:32 pm

Thank you I'll try that.
Lina820
Junior Member
 
Posts: 8
Joined: Tue Jan 22, 2008 1:08 am

Postby Mystery » Tue Jan 29, 2008 11:31 pm

Okay, here is an example of how such a multiple dialogue can be set up. This example refers to one "question" and two possible "answers"; but it can be extended to more possible answers.
There may be easier ways to do it though. This is the best that I can offer at the time being - I keep working on it, and hope to find an easier solution (or a solution that can be customized easily) :roll:
So take it as "work in progress" ;)


First, create your screen where you wish to have the dialogue.
Add some text (3 times) by rightclicking on the screen as placeholder, it doesn't matter what you write in it. Choose for each of them an appropriate color and font that can be seen in front of the background that you use:
Text for MyQuestion
Text for MyAnswer1
Text for MyAnswer2

Then create a frame where the player should go after exiting the dialogue, in this case it's called "GamescreenNext".

Then create the following variant variables:
MyQuestion
MyAnswer1
MyAnswer2

Then create a hotspot over MyAnswer1 and MyAnswer2.
Add to the Advanced Tab of the hotspot MyAnswer1 the following code:
Code: Select all
MyAnswer1_Clicked

Add to the Advanced Tab of the hotspot MyAnswer2 the following code:
Code: Select all
MyAnswer2_Clicked


After that, add to the Advanced Tab of your Frame Property the following:
Code: Select all
Dialogue1
DisplayText



And then comes the hard work :lol:

Go to the VB Procedures of your project, and add subroutines for the dialogue (the dialogue contents, and the definitions what dialogue should be called). Please note, that the contents of your variant variables should not be repeated, they must be unique.

Example:

Code: Select all
Sub DisplayText 'This will make sure that the text of your questions and answers will be displayed
Text(1) = MyQuestion
Text(2) = MyAnswer1
Text(3) = MyAnswer2
End Sub

'Add your dialogues, in this example 7 different dialogues
Sub Dialogue1
MyQuestion = "How are you?"
MyAnswer1 = "Great!" 'go to Dialogue 2 as defined in Sub MyAnswer1_Clicked
MyAnswer2 = "Bad." 'go to Dialogue 3 as defined in Sub MyAnswer2_Clicked
DisplayText
End Sub


Sub Dialogue2
MyQuestion = "Good to hear. Will you help me?"
MyAnswer1 = "Yes." 'go to Dialogue 4 as defined in Sub MyAnswer1_Clicked
MyAnswer2 = "No." 'go to Dialogue 5 as defined in Sub MyAnswer2_Clicked
DisplayText
End Sub

Sub Dialogue3
MyQuestion = "That's a pity." 'Exit Dialogue and go to next screen after 2 seconds
MyAnswer1 = ""
MyAnswer2 = ""
DisplayText
Action.CreateTimedEvent 2, "GamescreenNext", false
End Sub

Sub Dialogue4
MyQuestion = "You need to bring me the letter, then I'll help you."
MyAnswer1 = "Okay." 'Exit Dialogue and go to next screen as defined in Sub MyAnswer1_Clicked
MyAnswer2 = "Where can I find it?" 'go to Dialogue 6 as defined in Sub MyAnswer2_Clicked
DisplayText
End Sub

Sub Dialogue5
MyQuestion = "Then I won't help you either. Bye."
MyAnswer1 = "No, wait. I've got money!" 'Go to Dialogue 7 as defined in Sub MyAnswer1_Clicked
MyAnswer2 = "Goodbye." 'Exit Dialogue and go to next screen as defined in Sub MyAnswer2_Clicked
DisplayText
End Sub

Sub Dialogue6
MyQuestion = "You need to talk to the wizard, he knows more about it. Bye" 'Exit Dialogue and go to next screen after 3 seconds
MyAnswer1 = "Bye."
MyAnswer2 = ""
DisplayText
Action.CreateTimedEvent 3, "GamescreenNext", false
End Sub

Sub Dialogue7
MyQuestion = "I don't need your money, I need the letter. Bye." 'Exit Dialogue and go to next screen after 2 seconds
MyAnswer1 = "Oh well. Bye."
MyAnswer2 = ""
DisplayText
Action.CreateTimedEvent 2, "GamescreenNext", false
End Sub

'Define what should happen if the player clicks the MyAnswer1 hotspot by using the content of the variant variables MyAnswer1

Sub MyAnswer1_Clicked
If MyAnswer1 = "Great!" Then
  Dialogue2  'go to Dialogue2
ElseIf MyAnswer1 = "Yes." Then
  Dialogue4 'go to Dialogue 4
ElseIf MyAnswer1 = "Okay." Then
  Action.GoToFrame "GamescreenNext" 'Exit Dialogue and go to next screen immediately
ElseIf MyAnswer1 = "No, wait. I've got money!" Then
  Dialogue7
End If
End Sub

'Define what should happen if the player clicks the MyAnswer2 hotspot by using the content of the variant variables MyAnswer2

Sub MyAnswer2_Clicked
If MyAnswer2 = "Bad." Then
  Dialogue3 'go to Dialogue3
ElseIf MyAnswer2 = "No." Then
  Dialogue5 'go to Dialogue 5
ElseIf MyAnswer2 = "Where can I find it?" Then
  Dialogue6 'go to Dialogue 6
ElseIf MyAnswer2 = "Goodbye." Then
  Action.GoToFrame "GamescreenNext" 'Exit Dialogue and go to next screen immediately
End If
End Sub

'In some cases the player needs to read an answer before leaving the screen, the following code defines the action of the timed event
Sub GamescreenNext
Action.GoToFrame "GamescreenNext"
End Sub
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby ZeornWarlock » Tue Feb 05, 2008 8:02 am

Mystery,

That is a lot of coding. I wanted to create deep conversations between the player and the NPCs in my horror projects, however seeing this I may wait until GM-Support check into a conversation editor I sent him. He is too busy to look into it right now, however I have over 40,000 words in one of my projects for conversation alone. :cry: (Which is a small game!)

There is no way I will script all of that. Most questions I have over 5 to 8 answers. From either the player or the NPCs. Especially if the player speaks with two NPCs or more. The same goes if NPCs speak between each other, which often happen. I am introducing a fellow hall of fame writer from the Neverwinter Nights game to AM; however, his projects contain three times as more words than my own stuff. So I think he will pass for now.

However, as GM-Support told me, other things need to be done before he tackles this and I completely understand. Poor GM-Support, he must dream of codes a lot. ;)

Meanwhile, I will try to keep my conversations to a minimum.

Nevertheless, your code is a pretty good filler for the time being. :)

Thanks.

ZW.
User avatar
ZeornWarlock
Expert Member
 
Posts: 347
Joined: Tue Jun 05, 2007 12:52 am
Location: In front of the monitor.

Postby Mystery » Tue Feb 05, 2008 2:57 pm

Thanks for your nice comment ZeornWarlock :)

Hehe, yes, this example is meant for short dialogues and for instant usage (before there is a better solution).

And maybe it can be also used as example to learn a bit about VBScript. Lol, I have my problems with VBScript as I'm unexperienced with it, and this is the way I learn its different aspects - by creating different examples of features for myself - until it works :lol: And since this topic was posted here, I thought I post my example.

I hope that GM will take a look into this, but I also know that he has enough to do :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests