Setting and using quest variables as conditions
Posted: Sat Dec 29, 2012 2:38 pm
In my endeavor to learn, one thing I would like to learn is using variables in my quests. For example, a simple scenario could be you talk to one of my actors and they ask you "what is your favorite color" from several possibilities:
Red, Blue, Green, Yellow, Brown, Black, White, Purple
Now, lets say I said blue. Then later on in the quest someone says to you "I hear your favorite color is blue," and they give you a blue outfit or another item of some sort. Or there could be other dialog possibilities or options based on your choice of blue, using that variable as a condition to make the dialog valid. Or if you chose red, a different dialog would be valid.
I've never done this yet but would like to learn, but I assume it's all handled in your quest script? So how do I go about doing it? (I think one way to do the same thing would be to create a global for each color, and set it's value to 1 and use that in my conditions, but I think that might be a quirky to do it.)
Thanks!
Red, Blue, Green, Yellow, Brown, Black, White, Purple
Now, lets say I said blue. Then later on in the quest someone says to you "I hear your favorite color is blue," and they give you a blue outfit or another item of some sort. Or there could be other dialog possibilities or options based on your choice of blue, using that variable as a condition to make the dialog valid. Or if you chose red, a different dialog would be valid.
I've never done this yet but would like to learn, but I assume it's all handled in your quest script? So how do I go about doing it? (I think one way to do the same thing would be to create a global for each color, and set it's value to 1 and use that in my conditions, but I think that might be a quirky to do it.)
Thanks!