Help with dialogs! [SOLVED]

Started by Mouth for war, Sun 31/07/2005 17:25:19

Previous topic - Next topic

Mouth for war

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?
mass genocide is the most exhausting activity one can engage in, next to soccer

hedgefield

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!

Mouth for war

hmm i get an error message when i put
SetGlobalInt(0, 0); in the main global script file
mass genocide is the most exhausting activity one can engage in, next to soccer

Mouth for war

I've got it working, Thanks alot man :D
mass genocide is the most exhausting activity one can engage in, next to soccer

TerranRich

Remember...variables are your friend. Did you read the BFAQ at all? :)
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk