I'm a beginner with this program and I'm having a problem. How can you make a character you talk to say something different the next time you speak to him? First time i talk to the character dialog 2 runs, but next time i talk to him i want dialog 3 to run. Can anyone help me out there?
At the very top of the global script, under //Main global script file, put
SetGlobalInt(0, 0);
Then, in the characters tab, under interactions(where you've specified to run dialog 2 when you talk to him/her), select instead Run Script from the list.
In it, put:
if (GetGlobalInt(0) == 0) {
RunDialog(2);
}
if (GetGlobalInt(0) == 1) {
RunDialog(3);
}
Now lastly, open up Dialog 2 in the dialog editor, and at the ending response, which could be for instance:
@ Dialog Option Nr #
EGO: Goodbye!
stop
Add set-globalint 0 1 between the last spoken sentence and the stop command.
That should do the trick!
hmm i get an error message when i put
SetGlobalInt(0, 0); in the main global script file
I've got it working, Thanks alot man :D
Remember...variables are your friend. Did you read the BFAQ at all? :)