I get a message "unknown command : setdialogoption" when trying to save a dialogue topic which contains a part like this :
@1 // option 1
ARA: "blabla"
EGO: "blabla ? blablabla ?"
ARA: "bla !"
SetDialogOption(0, 1, eOptionOffForever)
SetDialogOption(0, 4, eOptionOn)
return
What's wrong ? Is it impossible to run script "setdialogoption" DURING a dialogue topic ? Help me please.
Jain, a really nooby noob with a really ambitious project
(http://koti.mbnet.fi/tk-/img/RTFM.gif) ;)
If you want to change optios of the currently running dialog, you'd use option-on, option-off and option-off-forever dialog script commands, but if you want to change options in some other dialog:
To run such things from a dialog, you need to use the run-script -command, in conjunction with the global dialog_request script function.
It works as:
run-script 1 //this in dialog
---
function dialog_request(int parm) {
if (parm == 1) {
// your script goes here, for what ever should happen at the point when the run-script is executed.
}
}
Thank you very much, the result's just what I wanted.
I have the a matter of the same type here, in another dialogue. I'd like that character's answer to my option 5 question to be random. So I put :
@5 // option 5
int ran=Random (4)
if (ran==0) ARA: ARA: bla ;
else if (ran==1) ARA: blabla ;
else if (ran==2) ARA: Scoubidoo ;
else if (ran==3) ARA: Willy Wanka(8) ;
EGO: Really ?
ARA: Yeah. He won two prizes, you know ?
EGO: That's not the Gandalf I'm looking for.
ARA: Sorry. ;
else ARA: blabla;
return
And, again, before saving, I obtain : "unknown command : int"
Let's suppose all I wrote in this dialog script is nonsense ; how do I get random answers then ?
You can use only the dialog script commands listed in the manual in dialogs. All normal script commands must be ran through the run-script command in the global dialog_request.