Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: deedee on Mon 01/03/2004 23:20:11

Title: Setting variable values in dialogues
Post by: deedee on Mon 01/03/2004 23:20:11
I'm trying to make a dialog option change the value of a Global Variable. I foung it on the help file, but i can't make it work. I'm sure that i'm scripting it wrong (i'm quite a begginer in the subject), but since the help file doesn't provide an example, i can't make out.

Can anyone enlighten me?
Title: Re:Setting variable values in dialogues
Post by: Scorpiorus on Fri 05/03/2004 23:28:59
Try:

dialog script:

@1 // option 1
run-script 3
return


main global script

function dialog_request(int value) {

Ã, Ã, Ã, if (value == 3) SetGlobalInt (...);

}

Works?