Page 1 of 1

Answers overlap

Posted: Sat Jan 20, 2007 7:06 pm
by manos40
With treebuilder I made this conversation script:

{

Start[ ()
{
Speak("Hi","");
Reply(1,"Yes_I_am");
Reply(2,"No_I_am_not");
switch(Conversation(50))
{
case 1
{
NewConversation("Give_question",true);
}
case 2
{
NewConversation("Start",false);
}
}
} ]

Give_question[ ()
{
Speak("Question","");
Reply(1,"Answer1");
Reply(2,"Answer2");
Reply(3,"Answer3");
switch(Conversation(50))
{
case 1
{
NewConversation("Correct_answer",true);
}
case 2
{
NewConversation("Wrong_answer",true);
}
case 3
{
NewConversation("Wrong_answer",true);
}
}
} ]

Correct_answer[ ()
{
Speak("Right","");
Reply(1,"Me_good");
switch(Conversation(50))
{
case 1
{
NewConversation("Start",false);
}
}
} ]

Wrong_answer[ ()
{
Speak("Wrong","");
Reply(1,"Me_wrong");
Reply(2,"me_not_try");
switch(Conversation(50))
{
case 1
{
NewConversation("Give_question",true);
}
case 2
{
NewConversation("Start",false);
}
}
} ]

}


Added this to conversation.txt:

[Hi]
Hi!
<CR>
Are you ready to answer my question?

[Yes_I_am]
Yes I am ready

[No_I_am_not]
No I am not

[Question]
1+1=?

[Answer1]
Two

[Answer2]
Three

[Answer3]
Four

[Right]
Well done!
<CR>
1+1=2

[Me_good]
I knew it!

[Wrong]
No!
<CR>
That is not the correct answer

[Me_wrong]
What was the question?

[me_not_try]
I don't care


The idea is to have the following conversation
Pawn: Hi are you ready to answer my question?
Player: Yes I am/No I am not

Pawn: 1+1=?
Player: Two/Three/Four

Pawn: Well done/Wrong answer
Player: I knew it/what was the question?/I don't care

The problem is that when the conversation advances to the next part, the player's answers overlap (previous answers remain on screen). What is wrong with the script?

Posted: Sat Jan 20, 2007 7:28 pm
by Juutis
There was a similar problem a while back.
http://www.realityfactory.info/forum/vi ... php?t=1466

The sad thing is, I don't think we found out why it does that.