can you change global variables from a dialog?

Started by Ardentsideburns, Thu 25/08/2016 23:41:07

Previous topic - Next topic

Ardentsideburns

just out of curiosity, i tried  setting a variable from false to true inside a dialog option and when checking for it again having a if function to redirect to another part of the dialog script within the same option. It looked like the system was fine with checking functions set outside the dialog, but that particular one seemed to remain false no matter how i wrote in the option that it was true. In the end i worked around it by simply turning off the option once it was selected (wich is something should've done from the beginning) but that made me think about if what i attempted to do is even possible and if i should be careful not to try that again, if it's not.

Slasher

Variables can be changed in dialogs. Post your full dialog script and let us look.

monkey0506

Dialog scripts use a special syntax. Any normal scripting commands (including assigning variables) must be indented, e.g., "  myVar = true;" vs "myVar = true;". Make sure the line starts with at least one space.

Mandle

I feel that global warming can only be changed via honest dialogs between nations...

SMF spam blocked by CleanTalk