IEnumerator HuntingMission() { pM.SetPerception(0); string greeting = "Alright, let's meet in the woods on the other side of the archway."; StartCoroutine(convoM.DisplayGreeting(1000, greeting)); yield return(new WaitForSeconds(3f)); progressID = -1; if (conversationBackgroundPanel.active == true) { conversationBackgroundPanel.SetActive(false); convoM.ClearConversation(); } Character tempChar = cM.GetCharacter(1000); tempChar.SetLocation(848); tempChar = cM.GetCharacter(1001); tempChar.SetLocation(848); tempChar = cM.GetCharacter(1002); tempChar.SetLocation(848); tempChar = cM.GetCharacter(1003); tempChar.SetLocation(848); while (sM.GetRoom() != 848) { yield return(new WaitForSeconds(.5f)); } string text = pM.GetName() + ", you go with Akaysha and Ben. Jasmine and I will head north. We'll meet back up 10 miles east."; DisplaySpeechAlert(-1, 1000, "Gregory", text); cM.GetCharacter(1000).SetLocation(748); cM.GetCharacter(1001).SetLocation(748); pM.AddFollowers(1002); pM.AddFollowers(1003); while (speechAlertPanel.transform.childCount > 0) { yield return(new WaitForSeconds(0.5f)); } yield return(new WaitForSeconds(2f)); text = "Alright, we should head south and then west."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); indoorPanel.transform.GetChild(3).GetChild(0).GetComponent <Button>().image.color = new Color(1f, 0.5f, 0.1f); while (sM.GetRoom() != 948) { yield return(new WaitForSeconds(0.5f)); } yield return(new WaitForSeconds(1f)); text = "Let's keep going south."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); indoorPanel.transform.GetChild(3).GetChild(0).GetComponent <Button>().image.color = new Color(1f, 0.5f, 0.1f); while (sM.GetRoom() != 1048) { yield return(new WaitForSeconds(0.5f)); } yield return(new WaitForSeconds(1f)); text = "Alright, now let's head east. Remember to observe for deer tracks."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); indoorPanel.transform.GetChild(2).GetChild(0).GetComponent <Button>().image.color = new Color(1f, 0.5f, 0.1f); int currentRoom = sM.GetRoom(); while (sM.GetRoom() != currentRoom + 1) { yield return(new WaitForSeconds(0.5f)); } yield return(new WaitForSeconds(1f)); text = "Let's take a second to look around."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); dM.AddInterruption(20, 1002, "Where are you going?"); //wait until the player observes while (gM.GetLastPlayerAction() != 2 || gM.GetLastPlayerAction() != 20) { yield return(new WaitForSeconds(0.5f)); } if (gM.GetLastPlayerAction() == 20) { StartCoroutine(DesertHuntingMission()); } //add the follow tracks tutorial option to the list and room dM.AddTutorialOption(100, new Color(0.3f, 0.1f, 0.1f), new Color(1f, 1f, 1f), "Follow deer tracks"); rM.AddTempOptionToRoom(sM.GetRoom(), 100); yield return(new WaitForSeconds(1f)); text = "You found tracks. Let's follow them."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); //add an interrupt for trying to leave dM.AddInterruption(20, 1002, "Where are you going!"); //wait until the player follows the track while (gM.GetLastPlayerAction() != 100) { yield return(new WaitForSeconds(0.5f)); } text = "You discern that the tracks lead south."; UpdateMainText(text); //add interruptions for going west, north, or east dM.AddInterruption(21, 1002, "If you wander off they'll think you're a deserter!"); dM.AddInterruption(22, 1002, "If you wander off they'll think you're a deserter!"); dM.AddInterruption(23, 1002, "If you wander off they'll think you're a deserter!"); //remove the interrupt for leaving dM.RemoveInterruption(20); //add the option to the next room and remove it from the current currentRoom = sM.GetRoom(); rM.AddTempOptionToRoom(currentRoom + 100, 100); rM.RemoveTempOptionFromRoom(currentRoom, 100); //reset the player's last action gM.SetLastPlayerAction(0); //wait until player follows tracks while (gM.GetLastPlayerAction() != 100) { yield return(new WaitForSeconds(0.5f)); } text = "You follow the trail until you spot it about a 100 feet away. It was a buck, looking to be about 250 pounds."; UpdateMainText(text); //add the shoot option to the room and the decision scroll and remove the follow option rM.AddTempOptionToRoom(sM.GetRoom(), 101); rM.RemoveTempOptionFromRoom(sM.GetRoom(), 100); dM.AddTutorialOption(101, new Color(0.7f, 0, 0), new Color(1, 1, 1), "Take the shot"); //add an interrupt for trying to leave and remove other interrupts dM.AddInterruption(20, 1002, "Where are you going?"); dM.RemoveInterruption(21); dM.RemoveInterruption(22); dM.RemoveInterruption(23); yield return(new WaitForSeconds(1f)); text = "There it is... Use this bow and take the shot."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); while (gM.GetLastPlayerAction() != 101) { yield return(new WaitForSeconds(0.5f)); } rM.RemoveTempOptionFromRoom(sM.GetRoom(), 101); dM.RemoveInterruption(20); text = "You land a direct hit to the neck."; UpdateMainText(text); yield return(new WaitForSeconds(1f)); text = "Wow, mildly impressive. Let's meet up with Gregory. We'll come back for the deer."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); killedDeer = 1; cM.GetCharacter(1000).SetLocation(852); cM.GetCharacter(1001).SetLocation(852); StartGuide(852); while (sM.GetRoom() != _targetRoom || sM.GetTime()[0] != 17) { yield return(new WaitForSeconds(0.5f)); } yield return(new WaitForSeconds(0.5f)); if (sM.GetTime()[0] == 17) { text = "We're going to be late for the feast. Let's head back. Hopefully Gregory isn't too furious."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); StartCoroutine(HeadBack()); yield return(null); } text = pM.GetName() + " got us a deer."; DisplaySpeechAlert(-1, 1002, "Akaysha", text); while (speechAlertPanel.active == true) { yield return(new WaitForSeconds(0.5f)); } if (cM.GetCharacter(1002).GetStatus() == "DEAD" && cM.GetCharacter(1003).GetStatus() == "DEAD") { text = pM.GetName() + "Where the hell are Akaysha and Ben?"; DisplaySpeechAlert(-1, 1000, "Gregory", text); } else { text = pM.GetName() + "Good. All of you grab some of this pirva. The shiny blue plants."; DisplaySpeechAlert(-1, 1000, "Gregory", text); } }