Up until now, when I have different dialog options which are controlled by variables or items, I have turned these options on/off by just making a new dialog, and then calling the appropriate dialog when they try to talk to the character.
But this is getting sort of awkward, because sometimes the option that I want to be available is nested within dialogs that are called from other dialogs....and since I can't do conditionals in the dialog script (to my knowledge), this would mean that I would have to duplicate copies of the entire dialoge tree and call the approprate "spawning" dialogue at the very beginning of the conversation even though most of the dialogues are the same.
So my question to you is...do I have to do it this way, or is there a more efficient way?Ã, Thanks
EDIT - if there were a way to turn a turn a specific dialog option on/off from outside of the dialog script, this would do the trick...does this exist?
Is
SetDialogOption (int topic, int option, int new_state)
what you're looking for?
Indeed it is, Strazer :) thank you for pointing that function out for me.
You're welcome. :)
how do u do the dialogue cuz im new and dont know how to make a conversation btwn people. I need a character to ask questions but i dont know how to do that can u help me?
???
It's all in the help file:
Tutorial -> Starting off -> Part 8 - Conversations
I just want to use the opportunity to ask an advanced dialog question:
I want to make a dialog, that can't be stoped by one option, but automaticly stops, after you chose all (3) options. Any idea? I couldn't manage it.
Quote from: Helme on Wed 11/02/2009 11:23:56
I want to make a dialog, that can't be stoped by one option, but automaticly stops, after you chose all (3) options. Any idea? I couldn't manage it.
Why not use a variable as a counter? Set it +1 for each option and when it reached 3, stop the dialog.
@Matti
Thanks, I'll try it!
Sorry bothering again, but I can't get it work.
What is the exact command (in global script & dialog script) to add something (+1) to a global variable?
Normally I just check older post and get the answers I need, but since globalints changed to global variables it doens't seem to be useful to look at old solutions.
Assuming you've created an int variable named "d_check", put this in the global script:
d_check++; // increment by one
As of the latest versions of AGS, one can finally use script code directly in the dialog scripts; the command is the same, just put exactly one space in front of it so AGS recognizes it as script command (and not dialog code).
Wow! That creates a lot of new possibilities for dialog puzzles. :o
Finally it works the way I planned it, but maybe I'll spice up my dialog puzzles now!
@Matti: Grüße in die Bundeshauptstadt
@KhrisMuc: Grüße in die Landeshauptstadt