answering questions

nogden74
06 Mar 2012, 14:50
is there a way of a npc asking three questions and depending on the amount of correct answers depends on what information is given as a prize?

for example if they get one question correct they are allowed to pass, if they get two questions correct then they get a hint about the game, if they get three questions right then they are told which items to pick up

Pertex
06 Mar 2012, 15:05
How do you want to do it? choosing answers from a menu or input the answers?

nogden74
06 Mar 2012, 15:06
inputing answers

Pertex
06 Mar 2012, 15:28
It should be something like this:

 msg("first question:")
answer= GetInput()
if (answer="....") {
counter=counter+1
}
msg("secondquestion:")
answer= GetInput()
if (answer="....") {
counter=counter+1
}
msg("thirdquestion:")
answer= GetInput()

if (answer="....") {
counter=counter+1
}
if (counter=1) {
...
} else if (counter=2) {
...
} else if (counter=3) {
...
}