AFAIK, there's no way currently to get the number of options that exist within a dialog. I'd like to do something like this:
function AnyChoice(Dialog *dt) {
int i=0;
int count=0;
while (i<dt.OptionCount) {
if (dt.GetOptionState(i) != eOptionOn) count++;
i++
}
return count;
}
if (AnyChoice(dlgFred)<2) Display("No point talking to him any more");
else dlgFred.Start();
Hear hear. This would would very useful in cases where you talk to an NPC whom you have exhausted all possible conversation topics with. Even simpler would be to bring this down to one line of code. Something like:
if (dFred.number_of_topics <= 1)
Display ("You have nothing else to say to him.")
Sounds reasonable to me.
Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=600
Though it would be reasonably easy to implement (if there were an OptionCount property to set the upper limit for each topic's options), would it make sense as well if there were a function such as Dialog.GetOptionCountWithState(DialogOptionState) to get the number of dialog options with the specified state set?