Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Kairus on Sat 07/02/2004 02:50:33

Title: Dialog scripting
Post by: Kairus on Sat 07/02/2004 02:50:33
How do I set the options of a dialog according to the state of the global variables? I've read the manual and it wasn't there so what I did until now was creating different dialog topics that will run under different combinations of global ints, but that will be really hard if you wanted to have dialogs that hide and activate options according to many variables.

So, is there a way to turn on and off options in the dialog topics from the rest of the game, or at least to control the state of the variables at the beginning so as to set the options properly?
Title: Re:Dialog scripting
Post by: Kweepa on Sat 07/02/2004 14:15:30
From the manual:

SetDialogOption(int topic, int option, int new_state);

Title: Re:Dialog scripting
Post by: strazer on Sun 08/02/2004 18:36:06
You could avoid the whole variables thing by activating the dialog options the moment your player does what has to be done to unlock them, in the same script.
Wasn't obvious to me at first, but I really can't see a reason to wait until you're about to run the dialog.

But I'm not too far ahead in my own game, so what do I know? :P