I hope there is some simple way to make dialog options appear when certain global variables are true. I watched densmings video tutorials about dialogs, but they didn't cover this topic. I also tried to search forums but didn't find answer to my problems.
Last thing that I have tried is this
// Dialog script file
@S// Dialog startup entry point
if (EMPquestion == true)
{
option-on 5
}
if (Siloquestion == true)
{
option-on 7
}
if (Billseen == true)
{
option-on 4
}
return
Option seems to be undefinied token in normal ags code. There must be some easy way to do this, but I can't find.
Thank's for help in advance
Use Dialog.SetOptionState() (http://www.adventuregamestudio.co.uk/wiki/Dialog_functions_and_properties#Dialog.SetOptionState) instead.
Also, you should not indent "option-on..." since that's a dialog command, not a script command.
Only indent script commands. (nod)
Quote from: Cassiebsg on Thu 02/07/2015 16:15:07
Also, you should not indent "option-on..." since that's a dialog command, not a script command.
Actually, yes, you could remove indentation before these commands.
In latest AGS these commands are automatically replaced with corresponding script functions when game is compiled. So you should get same results.
Thank you again for help.
dialog.SetOptionState is the way I got my code working.
Haven't tried with "option-on" without indentation.