I have this part and when they click that one dialog I want DETHLG to walk off the screen but I didn't see anything The dialog commands available .
So did I miss something? or no way to do that?
@3 // Hey their giving away hotdog's at the shack.
DETHLG:Wow cool I think I will get some!.
MELT:Ok well have fun.
return
What you can do in a dialog script is limited, when you have to do something that the dialog script can't handle directly, you may use the run-script command to do this via the text script function dialog_request(), and then return to the dialog. Example:
In dialog script:
@3 // Hey their giving away hotdog's at the shack.
DETHLG:Wow cool I think I will get some!.
MELT:Ok well have fun.
run-script 7
return
In your global script, create a function called dialog_request() (if it wasn't created already), something like below:
function dialog_request(int value){
Ã, if (value==7) cDethlg.Walk(250, 100);
}
More info here (http://bfaq.xylot.com/#coding02).
I think you can do "run-script x" comand from the dialog system. You would catch that call in the global script using the dialog_request() interaction function. From the manual:
Quote
run-script X
Runs global text script function "dialog_request", with X passed as the single parameter. This allows you to do more advanced things in a dialog that are not supported as part of the dialog script. The "dialog_request" function should be placed in your game's global script file, as follows:
function dialog_request (int xvalue) {
// your code here
}
So I would do the function:
run-script dialog_request()
Then just do the code part like that.
function dialog_request (int xvalue) {
// your code here
}
nope, something like:
in dialog script:
run-script 7
in global script:
function dialog_script(int xvalue){
Ã, if (xvalue==1) //do something
Ã, if (xvalue==2) //do some other thing
Ã, ...
Ã, ifÃ, (xvalue==7) cDethlg.Walk(blah blabla);
}
Read more about it from the BFAQ question I refered to in my last post.
Thanks for the help I got it to work :)