the quest wiki:
http://docs.textadventures.co.uk/quest/
this is a bit more than what you're asking for, but it does a good job for showing~guiding you through it:
http://docs.textadventures.co.uk/quest/guides/character_creation.html
generally you want:
.1. the 'msg' Script for asking your question:
in code:
http://docs.textadventures.co.uk/quest/scripts/msg.html
msg ("One plus One equals what?")
or, in the GUI~Editor:
run as script -> add a~new script -> output -> 'print a message' Script -> [MESSAGE]: for text only, or [EXPRESSION]: for text+VARIABLES
.2. the 'get input' Script for getting the input of the person playing the game:
in code:
http://docs.textadventures.co.uk/quest/scripts/get_input.html
(using within a Function, as an example)
<function name="question_1_function">
msg ("One plus One equals what?")
get input {
// the 'get input' Script automatically (hidden from you) sets the built-in Variable 'result' to the person's, who's playing the game, input: result = your_typed_in_input_during_game_play
// your scripts
}
</function>
or in the GUI~Editor:
run as script -> add a~new script -> output -> 'get input' Script
.3. your scripts:
http://docs.textadventures.co.uk/quest/scripts/if.html
http://docs.textadventures.co.uk/quest/scripts/msg.html
if (result = "2" or result = "two") {
msg ("Correct, good job!")
} else {
msg ("That's incorrect, try again.")
// loop~repeat this script block
}
so in full code example:
<function name="question_1_function">
msg ("One plus One equals what?")
get input {
if (result = "2" or result = "two") {
msg ("Correct, good job!")
} else {
msg ("That's incorrect, try again.")
question_1_function
}
}
</function>
or in the GUI~Editor:
run as script -> add a~new script -> scripts -> 'if' Script -> [EXPRESSION]: if you want to write out the code yourself, or [whatever]: I don't know the GUI~Editor's options and etc well.
-> then, -> add a script -> output -> 'print a message' Script -> [MESSAGE] -> Correct, good job!
else,
-> add a script -> output -> 'print a message' Script -> [MESSAGE] -> That's incorrect, try again.
(for my example only): add a script -> ??? -> 'call function' Script -> for Function name: question1function, Parameters: (leave blank, don't add any in)
in your post, you say: "for example when entering a room, it asks the question", which would be done via:
in the GUI~Editor:
'whatever the room name' (Room) Object -> 'whatever it is called or is' Tab -> 'on enter room' text box -> [run as script] -> put in the entire scripting above (but ignore my use of putting the scripts into a Function, unless you want to use a Function ~ ask me if you want to do this, and don't know how) goes into this 'on enter room' now-script-instead_of-text box.
if you want better code, then you got to use Commands and~or Functions, doing 'concatenation', as an example:
http://docs.textadventures.co.uk/quest/elements/function.html (scroll down ~ look at the: 'working example' bottom section)