problems with displaying, enabling and disabling dialog

Started by Davimee, Tue 31/05/2005 17:19:32

Previous topic - Next topic

Davimee

Hello.Ã,  I am experimenting with dialogs.Ã,  I have my player character talking to a NPC.Ã,  Once he cycles through all of the available dialog options I want to disable them, and the next time he talks to the NPC I want a new option to be displayed.Ã,  On the second and following times my PC talks to the NPC I want the same dialog option to be displayed.Ã,  My first problem is my greeting is not being displayed.Ã,  In order to be able to turn it off I have moved my greeting to option 1 in my topic, but option one is not being displayed at all.Ã,  I don't want it to be a choice at the bottom of the screen, I just want it to be said (like the normal startup), then go to the choices of options 2 and 3.Ã,  Here is a screen shot of what I have in my dialogs pane:


This is the scripting I'm using:
// dialog script file
@SÃ,  // dialog startup entry point
return
@1Ã,  // option 1
LET:Ã,  "Welcome aboard, Ensign John."
JEFF:Ã,  "Thank you, Lieutenant.Ã,  It is my pleasure to serve here."
option-off 1
return
@2Ã,  // option 2
LET:Ã,  "Ensign Mary has already arived and begun her tour of the ship."
LET:Ã,  "Please continue on to your quarters where the ship's Counselor will meet you."
JEFF:Ã,  "Yes, Sir."
option-off 2
return
@3Ã,  // option 3
LET:Ã,  "I hope you enjoy your tour aboard."
JEFF:Ã,  "I'm sure I will, Sir.Ã,  It's an honor to be serving here."
option-off 3
stop
@4Ã,  // option 4
LET:Ã,  "Please go to your quarters.Ã,  The ship's Counselor will be waiting for you there."
JEFF:Ã,  "Yes, Sir.Ã,  I'm on my way."
stop

Anyway, my problem is that when the dialog begins, it completely skips @1.Ã,  It goes directly to @2.Ã,  I've also tried clicking on the "show" after option 1, but that didn't help.Ã,  It displays options 2 and three, then the dialog stops.Ã,  I do want it to stop after dialog 3.Ã,  Then when I click on the character to talk again the game locks up.Ã,  I just get a big arrow (for my cursor) and I can't click on anything.Ã,  No dialog is displayed, and the bar at the top of the screen that gives the option to exit is not available.Ã,  I have to click alt X to quit the game.Ã, 

Some additional information that might help is as follows:
Here is the information in the character's pane for LET - For interaction when you talk to the character I have Game - disable dialog option (0,4),Ã,  Game - Run dialog (0), Game - Enable dialog option (0,4).Ã,  For the interactions in the room editor I have Game - enable dialog option (0,1).

Is there anything else you need to know to help me with this problem?Ã,  If I have posted anything here that doesn't make sense, please let me know.Ã,  Thank you!

Scorpiorus

Something like this can be a bit tricky if you just want to use the dialog system and no other commands such as DisplaySpeech.

Anyway, here is how you can do this with the dialog system only:

Add an extra blank dialog option (just like option 1 or 4).

Show for options should look like:

1. Show [ x ]
2. Show [Ã, Ã,  ]
3. Show [Ã, Ã,  ]
4. Show [Ã, Ã,  ]
5. Show [Ã, Ã,  ]


Now the script:

// dialog script file
@SÃ,  // dialog startup entry point
return

@1Ã,  // option 1
LET:Ã,  "Welcome aboard, Ensign John."
JEFF:Ã,  "Thank you, Lieutenant.Ã,  It is my pleasure to serve here."
option-off 1
option-onÃ,  2
option-onÃ,  3
return

@2Ã,  // option 2
LET:Ã,  "Ensign Mary has already arived and begun her tour of the ship."
LET:Ã,  "Please continue on to your quarters where the ship's Counselor will meet you."
JEFF:Ã,  "Yes, Sir."
option-off 2
option-onÃ,  5
return

@3Ã,  // option 3
LET:Ã,  "I hope you enjoy your tour aboard."
JEFF:Ã,  "I'm sure I will, Sir.Ã,  It's an honor to be serving here."
option-off 3
option-onÃ,  5
return

@4Ã,  // option 4
LET:Ã,  "Please go to your quarters.Ã,  The ship's Counselor will be waiting for you there."
JEFF:Ã,  "Yes, Sir.Ã,  I'm on my way."
stop

@5Ã,  // option 5
option-onÃ,  4
option-off 5
stop

If you're using AGS 2.7 make sure you set game.show_single_dialog_option to 0. It's actually the default behavior but just in case.

Let us know if it works :)

Davimee

If I'm doing this the hard way and there is an easier way of doing it, I'm all for it!Ã,  I did a search in the help file on DisplaySpeech, but I didn't find anything that was related to this.Ã,  It all had to do with where the speech was displayed when a character is talking.

I added the extra blank dialog and just put the X after the first option.Ã,  Then I changed the script to the way you have it, and tested it out.Ã,  This time when I clicked on the character to talk with him the game froze up immediately.Ã,  I took the X off of the first option and put it back with 2 and 3, and it worked ok, although my character LET still wouldn't say the first option.Ã,  So then I tried putting an option name for 1 and 4, and just didn't click the X for show.Ã,  This time the game showed all of my dialog just the way I want it, except it also showed the option name for 1 and 4, even though I didn't have the X checked.Ã,  The dialog comes up perfectly this way, but I would prefer that options 1 and 4 are not displayed.Ã,  Is there a way around this?Ã,  If not it's not that big of a deal, I'm just grateful to know there is a way of disabling speech options after they have been said once.Ã,  Ã, :)

Oh, and I have version 2.61.Ã,  I didn't realize a new version was available, but I think I'll wait until I'm finished with this game to download the new version.

Davimee

Aha!

I've been fiddling with it a bit more, and in LET's interactions I took out disable and enable 0,4, and just left it at run dialog 0.Ã,  This time option 4 was not at all visible when I clicked on the character to talk the first time, although the Welcome for topic one was visible.Ã,  But that's not a big deal.Ã,  Once I clicked through the initial dialog and then clicked on LET again, only option 4 came up, and the option name wasn't visible at the bottom of the screen, he just said what I wanted him to say, so that works perfectly.Ã,  Thank you! ;D  (Hopefully what I've just typed here makes sense.  I just reread it and I might have worded this a little oddly, but my dialogs are working now, so thanks!)

Scorpiorus

Quote from: Davimee on Tue 31/05/2005 21:02:22If I'm doing this the hard way and there is an easier way of doing it, I'm all for it!Ã,  I did a search in the help file on DisplaySpeech, but I didn't find anything that was related to this.
You would then need to set up a variable to indicate when the player passed the dialog the first time and then use DispaySpeech instead of the dialog to say what's in the last option.

QuoteOh, and I have version 2.61.Ã,  I didn't realize a new version was available
The current official version is 2.62 but soon 2.7 will take its place. :)

Quote from: Davimee on Tue 31/05/2005 21:08:38
I've been fiddling with it a bit more, and in LET's interactions I took out disable and enable 0,4, and just left it at run dialog 0.
Ah, yes. It's required to remove all these enable option/disable option actions in order for the script I posted to work.

QuoteBut that's not a big deal.Ã,  Once I clicked through the initial dialog and then clicked on LET again, only option 4 came up, and the option name wasn't visible at the bottom of the screen, he just said what I wanted him to say, so that works perfectly.
Glad to hear. Still, the intro dialog option should also work if only the 1st option has Show ticked (1st, 4th and 5th are to be blank). Have you tried it again after removing of all enable/disable dialog option actions?

Davimee

QuoteGlad to hear. Still, the intro dialog option should also work if only the 1st option has Show ticked (1st, 4th and 5th are to be blank). Have you tried it again after removing of all enable/disable dialog option actions?

Hey, great!Ã,  I tried checking the first box this time and left all the others blank, and it now works perfectly!Ã,  Thank you so much for your help!Ã,  I've been working on this problem for about 4 hours, and I was about to go insane when I finally decided I should try the forum for help.Ã,  I hate to post questions, I'm always afraid I'll ask a question that has already been asked or something that is in the manual and I've just missed it.Ã,  But now I can finally move on in my game.Ã,  I might just actually finish it sometime this year!Ã,  *lol*

Scorpiorus

No problem, I am glad you got it working!

And don't be afraid of asking a question that might have already been answered somewhere, that's ok. It's just encouraged to browse the manual and do a quick search around the forum to see if a similar problem was discussed lately.

But what's more important is that you have provided a very detailed description about the problem, including what you're after and what you have already done to achieve the desired goal. For instance, I got all the necessary information from the first post including the original dialog script text and the initial dialog topic settings.


p.s. Oh and Good luck with your game :)

Davimee

Thanks!Ã,  I'm having a lot of fun with it, although I think I'm becoming addicted.Ã,  It's hard to tear myself away from the computer long enough to get anything else done!  I think I need to start setting time limits so I don't end up neglecting my husband and kids.Ã,  *l*

SMF spam blocked by CleanTalk