//Jimmy Vegas Unity Tutorial //This script will start your second quest var TextBoxOnCheck : int = 0; var MessageBox : GameObject; var TextBox : GameObject; var QuestBox : GameObject; var QuestText : GameObject; var Key001 : GameObject; function OnMouseDown () { if (TextBoxOnCheck == 0) { TextBoxOnCheck = 1; MessageBox.SetActive(true); TextBox.GetComponent.().text = "Servant: I want you to retrive some Gold Bulion from the cave down the path. Here is the key."; QuestText.GetComponent.().text = "Active Quest: Retrive The Bullion"; Key001.SetActive(true); } else { TextBoxOnCheck = 0; MessageBox.SetActive(false); } } function Update () { if (Input.GetButtonDown("Submit")) { if (TextBoxOnCheck == 1){ MessageBox.SetActive(false); TextBoxOnCheck = 0; } } if (Input.GetButtonDown("Cancel")) { if (TextBoxOnCheck == 1){ MessageBox.SetActive(false); TextBoxOnCheck = 0; } } }