Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Minimi on Tue 23/09/2003 10:07:16

Title: how to set option-on of another dialog?
Post by: Minimi on Tue 23/09/2003 10:07:16
I want to make that when you've talked to someone in dialog2, a line of option in dialog 1 must be set on, so it's visible. But how do I do that. I can only set the option-on command for the dialog im in. Please help me!!
Title: Re:how to set option-on of another dialog?
Post by: Ishmael on Tue 23/09/2003 12:35:12
Allthough this was allready solved (:P), I'll post the solution here for others to see:

In dialog:

run-script x

where x is a free dialog_request param number. If you haven't used dialog_request yet, then it would be 1

In global Script:

function dialog_request (int drval) { // the int's name can be anything, as long as it isn't a duplicate of anohter existing int
if (drval == 1) { // if run-script 1 is executed
SetDialogOption(1,2,1); // will set option 1 in dialog 2 to 'on'
}
}

Ther ya go! ;)