home *** CD-ROM | disk | FTP | other *** search
- # b_0PulleyJawa.cog
- #
- # CommuniCog for the Jawa in the Pulley Puzzle.
- #
- # Desc:
- # Het talks, you know, like a jawa?
- #
- # 12/23/97 DGS Created.
- #-----------------------------------------------------------------------------
-
- symbols
- message converse
- message startup
- message user1
- message user2
- message arrived
-
- thing Gonk
- thing player local
-
- int Met=0 local
- int Joke=0 local
- int spoken_1=0 local
- int gears=0 local
- int ConversationActive=0 local
- int gonkcurframe=0 local
- int ResponseID local
- int bye=0 local
- int pulley_1_b=25 local
- int pulley_2_b=26 local
- int pulley_3_b=27 local
- int gets=0 local
- flex wait_time=1.3 local
- end
-
-
- code
- startup:
- hastalked = 0;
- global1 = 0;
- return;
-
- user2:
- gets = gets +1;
- print("GETS");
- return;
- converse:
- // What response did the player select?
- ResponseID = dwGetPlayerResponse();
-
- if (ResponseID == 0 && !ConversationActive)
- {
- ConversationActive = 1;
- playsong(0,0,0);
- dwfreezeplayer();
- ResponseID = 1;
- }
-
- if (ResponseID == 1) #beginning Node
- {
- //+++++++++++++++++++++++++++++++++++++++++++++++ Greetings setup
- if (met == 0) // If they haven't met.
- {
- //dwSetDialogText("PJC0000"); // Jawwa: Hello
- dwplaycharacterspeech("PJC0000","T3JB001.wav");
- met = 2; // Tell him to say "anything else?"
- }
- else if (met == 1)
- {
- //dwSetDialogText("PJC0001"); // Jawa: Hello again
- dwplaycharacterspeech("PJC0001","T7JB002.wav");
- met = 2; // Tell him to say "anything else?"
- }
- else if (met == 2)
- {
- dwplayplayerresponse();
- //dwSetDialogText("PJC0003"); // Aynthing else?
- dwplaycharacterspeech("PJC0003","T3JB004.wav");
-
- }
- //+++++++++++++++++++++++++++++++++++++++++++++++ END Greetings setup
- if (global1 == 0) dwAddResponse(100, "PJP0100","T3xx003.wav",71); //droid: Where's the rope that lifts the block?
- if (global0 == 0) dwAddResponse(400, "PJP0400","T3xx006.wav",72); //droid: Where do I go to lower the hook?
- if (global1 == 2)
- {
- if (gets <2) dwAddResponse(200, "PJP0200","T3xx004.wav",73); //droid: Where are the other pulleys?
- }
- if (global1 == 1) dwAddResponse(300, "PJP0300","T3xx005.wav",71); //droid: How do I lift the block? It's too heavy.
- if (global1 == 2) dwAddResponse(450, "PJP0450","T3xx007.wav",72); //droid: What do I do now? I lifted the block.
- dwAddResponse(500, "PJP0500","T3xx008.wav",20); //droid: Thanks, I need to go.
- }
-
- if (ResponseID == 100) // Where's the rope?
- {
- dwplayplayerresponse();
- //dwSetDialogText("PJC0100"); // Jawa: That's on the roof of this building
- dwplaycharacterspeech("PJC0100","T3JB010.wav");
- dwAddResponse(1,"PJP0002","T3xx002.wav",30); // Droid: Thanks. (send it back to the root node)
- }
- if (ResponseID == 200) // WHere are the other pulleys?
- {
- dwplayplayerresponse();
- //dwSetDialogText("PJC0200"); // Jawa: They're around here somewhere.
- dwplaycharacterspeech("PJC0200","T3JB011.wav");
- dwAddResponse(1,"PJP0001","T1xx014.wav",30); // Droid: okay. (send it back to the root node)
- }
- if (ResponseID == 300) // The block's too heavy
- {
- dwplayplayerresponse();
- //dwSetDialogText("PJC0300"); // Jawa: Try other pulleys.
- dwplaycharacterspeech("PJC0300","T3JB012L.wav");
- dwAddResponse(200, "PJP0200","T3xx004.wav",71); //droid: Where are the other pulleys?
- dwAddResponse(1, "PJP0002","T3xx002.wav",30); // Droid: Thanks. (send it back to the root node)
- }
- if (ResponseID == 400) // Lower the hook
- {
- dwplayplayerresponse();
- //dwSetDialogText("PJC0400"); // Jawa: That's on the other roof
- dwplaycharacterspeech("PJC0400","T3JB014.wav");
- dwAddResponse(1,"PJP0002","T3xx002.wav",30); // Droid: Thanks. (send it back to the root node)
- }
- if (ResponseID == 450) // I lifted the block
- {
- dwplayplayerresponse();
- //dwSetDialogText("PJC0450"); // Jawa: That's on the other roof
- dwplaycharacterspeech("PJC0450","T3JB015.wav");
- dwAddResponse(1,"PJP0002","T3xx002.wav",30); // Droid: Thanks. (send it back to the root node)
- }
- if (ResponseID == 500) // # bye
- {
- dwplayplayerresponse();
- if (global1 != 2)
- {
- //if (bye == 0) dwSetDialogText("PJC0002"); //first goodbye
- //if (bye == 1) dwSetDialogText("PJC1000"); //2nd goodbye
- //if (bye == 2) dwSetDialogText("PJC1001"); //3rd goodbye
- //if (bye == 3) dwSetDialogText("PJC1002"); //4th goodbye
- //if (bye == 0) dwSetDialogText("PJC0002"); //first goodbye
- //if (bye == 0) dwSetDialogText("PJC0002"); //first goodbye
- if (bye == 0) dwplaycharacterspeech("PJC0002","T3JB003.wav"); //2nd goodbye
- if (bye == 1) dwplaycharacterspeech("PJC1000","T3JB005.wav"); //3rd goodbye
- if (bye == 2) dwplaycharacterspeech("PJC1001","T3JB006.wav"); //4th goodbye
- if (bye == 3) dwplaycharacterspeech("PJC1002","T3JB007.wav"); //5th goodbye
- if (bye == 4) dwplaycharacterspeech("PJC1003","T3JB008.wav"); //5th goodbye
- }
- else dwplaycharacterspeech("PJC1004","T3JB009.wav"); //Complete goodbye
- bye = bye +1;
- if (bye == 5) bye = 0;
- met = 1; //Reset the greeting so he'll say "Hello again" instead of "anything else?"
- dwClearDialog();
- ConversationActive = 0;
- ShuffleTracks(2, 3, 4, 5);
- dwunfreezeplayer();
- }
-
- gonkhelpsout:
- return;
-
- arrived:
-
- return;
- end
-
-
-