Angry Employees
Perhaps the boss conversation was a bit more complicated than I remembered. The other 14 conversations, however, are really simple. The first thing has to happen is a way to handle starting all these conversations. This is fairly simple, as all that needs to be done is to assign every character in the cubicle maze a separate tile number. When the player tries to enter a tile, the conversation is started. This is handled by one very large switch statement.
- function NPCHandler(n)
- {
- if (npcArray[n-9] == false)
- {
- npcArray[n-9] = true;
- score += 5;
- }
- switch (n)
- {
- case 9:
- NPCMessage = "Considering who his uncle is, it is no wonder that he got a sweet deal. What’s that? You don’t know who his uncle is! Well, it is probably in your best interest that you don’t.";
- gotoAndPlay("TalkBrMale");
- break;
- case 10:
- NPCMessage = "I honestly feel that the boss has some type of mental illness which requires him to torture people. He is not happy unless he extends the suffering as long as possible.";
- gotoAndPlay("TalkBlMale");
- break;
- case 11:
- NPCMessage = "I knew this day was coming. That is why I had moved all my personal stuff out of my cubicle over a month ago. Still, you would think someone who had an uncle who was head of a major criminal organization would be able to run a company better.";
- gotoAndPlay("TalkBrMale");
- break;
- case 12:
- NPCMessage = "Life is like a bowl of cherries. Sometimes you get delicious fruit, but today we got the pits!";
- gotoAndPlay("TalkBlMale");
- break;
- case 13:
- NPCMessage = "Dude! This is great! The waves at the beach are just ideal for surfing and now I don’t have to work so I can enjoy the surf!";
- gotoAndPlay("TalkBlMale");
- break;
- case 14:
- NPCMessage = "Don’t tell anyone, but I hacked into the company records. It seems that the boss transferred a bunch of shares into Nancy’s account. With the purchasing company buying shares at an inflated price it is no wonder she was so happy today!";
- gotoAndPlay("TalkBrMale");
- break;
- case 15:
- NPCMessage = "You have to admire someone who can take a five minute speech and drag it out into a two hour affair. I just wonder why someone with those skills couldn’t keep the company afloat. Yes I am in management, how did you know?";
- gotoAndPlay("TalkBlFemale");
- break;
- case 16:
- NPCMessage = "I can understand selling the company, what I can’t understand is why the buyer doesn’t want any of the employees. After all, we created the software that the other company is purchasing.";
- gotoAndPlay("TalkRFemale");
- break;
- case 17:
- NPCMessage = "From what I understand, the company was purchased simply to shut it down so that there would be one less competing product in the marketplace.";
- gotoAndPlay("TalkBlFemale");
- break;
- case 18:
- NPCMessage = "What is really sad is that in a month we would have had our new product ready. We weren’t even behind schedule. I’m not sure why the boss couldn’t have waited a couple of months before selling out. Had he waited, we may not have even had to sell out.";
- gotoAndPlay("TalkRFemale");
- break;
- case 19:
- NPCMessage = "Did you notice that Nancy wasn’t upset about this. I’ve told you before and I’ll tell you again, she is sleeping with the boss! I’ll even bet that she got a sweet deal out of this as well!";
- gotoAndPlay("TalkBrFemale");
- break;
- case 20:
- NPCMessage = "I’m use to long boring meetings that are totally unproductive so it didn’t bother me that much. Too bad we ran out of doughnuts so early. I noticed that the boss wasn’t even aware that we had a new product that was only weeks away from shipping.";
- gotoAndPlay("TalkBrFemale");
- break;
- case 21:
- NPCMessage = "I don’t know why everybody is so upset about this. I think that the boss acted in the best interest of the shareholders! What’s worse are all the programmers crying that the new product was just about ready. Can’t they understand that the shareholders have to make a profit, not the company!";
- if (gotCheck == false)
- {
- score += 5;
- gotCheck = true;
- }
- gotoAndPlay("TalkNancy");
- break;
- case 22:
- NPCMessage = "I am the great wizard Zolitain apprentice, meet your end! What’s that? This isn’t Coffee Quest 5? It’s not even Coffee Quest’s Revenge? You mean neither of those games have been released yet? What does that Spelchan guy think he’s doing? Creating new universes?";
- gotoAndPlay("TalkZolitain");
- break;
- }
- }
The separate face frames each have a small bit of code to set up the conversation dialog. This code is as follows:
- stop();
- dialog_movie.ST.setCallback(this, conversationEnded);
- dialog_movie.ST.setMessage(npcMessage);
- dialog_movie.ST.setMenu(2,"Goodbye", 1);
Finally, the conversationEnded function is simply this:
- function ConversationEnded(n)
- {
- }