Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: lilinuyasha on Mon 09/05/2011 23:38:00

Title: dialog dependancies?
Post by: lilinuyasha on Mon 09/05/2011 23:38:00
How would i make an option in one dialog (or a seperate dialog entirely) be available only after a seperate dialog has been chosen?
Title: Re: dialog dependancies?
Post by: on Tue 10/05/2011 00:15:22
In the current dialog you would use "option-on" or to affect another dialog you would need to call a run script command in both dialogs, one to set the option and one to read whether the option should be on or not. I think. Someone with some ACTUAL AGS technical knowledge will hopefully clear this up for you :)
Title: Re: dialog dependancies?
Post by: lilinuyasha on Tue 10/05/2011 00:19:38
Yes, that makes sense. Thanks! now if i can figure out how exactly to script phrase my other dialog activities, we'll be fine :)
Title: Re: dialog dependancies?
Post by: Khris on Tue 10/05/2011 01:37:48
Put at least one space at the beginning of the line to indicate to AGS that you're using a normal script command, not a dialog command, then use Dialog.SetOptionState() (http://www.adventuregamestudio.co.uk/manual/Dialog.SetOptionState.htm):

Example:
...
@3
player: Do you sell weapons?
Merchant: Yes, of course.
option-off 3                                   // dialog command
  dMerchantBuy.SetOptionState(3, eOptionOn);   // script command, indented
return
...
Title: Re: dialog dependancies?
Post by: lilinuyasha on Tue 10/05/2011 03:11:17
I needed an option in a completely differnt conversation to open. i figured it out. thanks guys! :=
Title: Re: dialog dependancies?
Post by: Khris on Tue 10/05/2011 03:27:18
And I told you exactly how to do that :)