Okay, so in the game I'm trying to make, someone asks the player a question. Then what was going to happen in my head, was that it will show a menu with the possible answers, and the player has to pick from them. I used the show menu thing from Quest Docs' Character Creation but can't figure out how the person will reply to the player's answer.
Should I use set attribute or set flag? or something different?
Help me, please.
ShowMenu will set a variable called result that will hold a string that is the selection the player made. You can set an attribute to the if you may want to know what it is later.
here's a thread to help you understand Attribute and the 'if' Script usage:
http://textadventures.co.uk/forum/samples/topic/5559/attributes-and-if-script-guide-by-hk
and if you want to see more advanced character creation stuff, at least for ideas, take a look here:
http://textadventures.co.uk/forum/samples/topic/4988/character-creation-crude-code-and-sample-game
to add on to what Pixie said:
'show menu (parameters)', ShowMenu (parameters)', and 'get input' do this automatically (hidden from you):
result = YOUR_TYPED_IN_OR_SELECTED_INPUT
you can now use 'result' in an 'if/else if/else' Script block or the 'switch' Script, or store (set) it into an Attribute, so you can use it anywhere/anytime/repeatedly, so long as the Object containing it, exists or still exists, of course.
An alternative option if you are interested is to make a "homemade menu" that requires a typed response.
Below is the explanation from my tutorial game.
menulist = Split("text;text", ";")
ShowMenu ("Question Here.", menulist, false) {
if (result = "") {
}
}
So how you use this is...
Split("Choice1;Choice2", ";")
ShowMenu ("If you want to use this you can but you can also leave it blank. What food would you like to eat?", menulist, false) {
menulist, false ((this is asking if you want the player to be able to ignore the script. True is no, false is yes.)) {
if (result = "Choice1") {
}
if (result = "Choice2") {
}
}
Hope this helps!