Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: ugo on July 27, 2012, 12:47:12 PM

Title: Removed a question from dialogue.
Post by: ugo on July 27, 2012, 12:47:12 PM
Please help.
I created two additional branches in the dialogue.
And now when I answer a question in the same branch.
From the list of the other branches are also removed a question.

[code]global DecreeEnd;
global TemaEnd;


////////////////////////////////////////////////////////////////////////////////
function SecretaryDialogue()
{
  var Responses;
  var Selected;
  var Loop = true;

  while(Loop)
  {
        // prepare the sentences
        Responses[0] = "question?";
   Responses[1] = "question?";
   Responses[2] = "question?";
   
        Responses[3] = "Exit.";

        // fill the response box
        if (PrinterBlank == 1 && DecreeEnd <= 5)Game.AddResponse(17, Responses[17]);
   if (NewsPaperArticle1 == 1 && TemaEnd <= 3)Game.AddResponse(18, Responses[18]);
   if (ConHit == 2 && HandleUse == false) Game.AddResponse(2, Responses[2]);

   
   Game.AddResponse(3, Responses[3]);
   
   

        // let the player choose one
   Selected = Game.GetResponse();

       

        // now let the Secretary reply depending on the selected sentence
        if(Selected == 0)
        {
          actor.Talk("Text");
     this.Talk("Text");
        }
   
        else if(Selected == 1)
        {
          actor.Talk("Text");
     this.Talk("Text");
          SecretaryDialogue2()
        }
   
        else if(Selected == 2)
        {
          actor.Talk("Text");
     this.Talk("Text");
          SecretaryDialogue3()
        }
   
   else if(Selected == 3)
        {
          actor.Talk("Text");
     this.Talk("Text");
          Loop = false;
        }
       }
      }



////////////////////////////////////////////////////////////////////////////////
function SecretaryDialogue2()
{
  var Re;
  var Se;
  var Lo = true;

  while(Lo)
  {

       Re[0] = "question?";
       Re[1] = "question?";
       Re[2] = "question?";
   
       Re[3] = "Exit.";

       Game.AddResponseOnceGame(0, Re[0]);
       Game.AddResponseOnceGame(1, Re[1]);
       Game.AddResponseOnceGame(2, Re[2]);
       Game.AddResponseOnceGame(3, Re[3]);
   
       Game.AddResponse(4, Res[4]);


       Se = Game.GetResponse();


       if(Se == 0)
       {
          actor.Talk("Text");
     this.Talk("Text");

     TemaEnd = TemaEnd+1;
     if (TemaEnd >= 4)
     {
       Lo = false;
      actor.Talk("Теперь, мне в
Title: Re: Removed a question from dialogue.
Post by: ugo on July 30, 2012, 07:47:42 AM
Anyone? Please help.
Title: Re: Removed a question from dialogue.
Post by: ugo on July 30, 2012, 09:46:29 AM
It's okay.
Title: Re: Removed a question from dialogue.
Post by: Jerrot on August 01, 2012, 11:12:29 AM
Sorry, I didn't even understand your question yet. Did you solve it?
Title: Re: Removed a question from dialogue.
Post by: ugo on August 03, 2012, 01:33:47 PM
Yes.