I cant get my run-script x in my dialogs to work.
Code:
#sectionstart dialog_request // DO NOT EDIT OR REMOVE THIS LINE
function dialog_request(int parameter) {
dialog_request (1) {
player.Walk(160,171,eBlock);
player.Say("Why, Thank-you");
player.Walk(160,160);
}
}
#sectionend dialog_request // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart dialog_request // DO NOT EDIT OR REMOVE THIS LINE
function dialog_request(int parameter) {
if (parameter==1) {
player.Walk(160,171,eBlock);
player.Say("Why, Thank-you");
player.Walk(160,160);
}
}
#sectionend dialog_request // DO NOT EDIT OR REMOVE THIS LINE
Using run-script x is like writing dialog_request(1); in a regular script.
If AGS hadn't rejected the syntax, you'd have gotten a function repeatedly calling itself until AGS'd have crashed.
BTW, if you want to display those grey boxes, use code tags:
[*code]...[*/code] without the *s
For other forum tags, check the link directly above the row of smileys.
Not only is dialog_request explained in the manual (albeit poorly) and the BFAQ (http://americangirlscouts.org/agswiki/Scripting%2C_Code_%26_Interaction#Running_regular_code_inside_dialog) (much better), it's been asked on the forums many, MANY times. Please, check all of those places before posting.