Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: stuh505 on Tue 25/05/2004 01:32:51

Title: Dialogs - question
Post by: stuh505 on Tue 25/05/2004 01:32:51
Up until now, when I have different dialog options which are controlled by variables or items, I have turned these options on/off by just making a new dialog, and then calling the appropriate dialog when they try to talk to the character.

But this is getting sort of awkward, because sometimes the option that I want to be available is nested within dialogs that are called from other dialogs....and since I can't do conditionals in the dialog script (to my knowledge), this would mean that I would have to duplicate copies of the entire dialoge tree and call the approprate "spawning" dialogue at the very beginning of the conversation even though most of the dialogues are the same.

So my question to you is...do I have to do it this way, or is there a more efficient way?Ã,  Thanks

EDIT - if there were a way to turn a turn a specific dialog option on/off from outside of the dialog script, this would do the trick...does this exist?
Title: Re: Dialogs - question
Post by: strazer on Tue 25/05/2004 01:44:29
Is
SetDialogOption (int topic, int option, int new_state)
what you're looking for?
Title: Re: Dialogs - question
Post by: stuh505 on Tue 25/05/2004 03:13:20
Indeed it is, Strazer  :) thank you for pointing that function out for me.
Title: Re: Dialogs - question
Post by: strazer on Tue 25/05/2004 03:19:20
You're welcome. :)
Title: Re: Dialogs - question
Post by: maknagame on Tue 10/02/2009 22:40:44
how do u do the dialogue cuz im new and dont know how to make a conversation btwn people.   I need a character to ask questions but i dont know how to do that can u help me?

???
Title: Re: Dialogs - question
Post by: Khris on Tue 10/02/2009 23:24:23
It's all in the help file:
Tutorial -> Starting off -> Part 8 - Conversations
Title: Re: Dialogs - question
Post by: Helme on Wed 11/02/2009 11:23:56
I just want to use the opportunity to ask an advanced dialog question:

I want to make a dialog, that can't be stoped by one option, but automaticly stops, after you chose all (3) options. Any idea? I couldn't manage it.
Title: Re: Dialogs - question
Post by: Matti on Wed 11/02/2009 11:49:12
Quote from: Helme on Wed 11/02/2009 11:23:56
I want to make a dialog, that can't be stoped by one option, but automaticly stops, after you chose all (3) options. Any idea? I couldn't manage it.

Why not use a variable as a counter? Set it +1 for each option and when it reached 3, stop the dialog.
Title: Re: Dialogs - question
Post by: Helme on Wed 11/02/2009 12:29:53
@Matti

Thanks, I'll try it!
Title: Re: Dialogs - question
Post by: Helme on Fri 13/02/2009 11:56:01
Sorry bothering again, but I can't get it work.

What is the exact command (in global script & dialog script) to add something (+1) to a global variable?

Normally I just check older post and get the answers I need, but since globalints changed to global variables it doens't seem to be useful to look at old solutions.
Title: Re: Dialogs - question
Post by: Khris on Fri 13/02/2009 12:47:20
Assuming you've created an int variable named "d_check", put this in the global script:
  d_check++;   // increment by one

As of the latest versions of AGS, one can finally use script code directly in the dialog scripts; the command is the same, just put exactly one space in front of it so AGS recognizes it as script command (and not dialog code).
Title: Re: Dialogs - question
Post by: Helme on Fri 13/02/2009 14:37:50
Wow! That creates a lot of new possibilities for dialog puzzles. :o
Finally it works the way I planned it, but maybe I'll spice up my dialog puzzles now!

@Matti: Grüße in die Bundeshauptstadt
@KhrisMuc: Grüße in die Landeshauptstadt