Iv been working on a simple dialog system only form some reason the next line in the conversation wont come up.
I think its something to do with me trying to use GUI labels.
Here is the code:
public class NPC_Dialog_2 : MonoBehaviour {
public string[] questionsButtons;
public string[] answerButtons;
bool Dialog = false;
bool Quest = false;
void OnGUI () {
GUILayout.BeginArea(new Rect(700,600,400,400));
if(Dialog)
{
Disable_Mouse();
GUILayout.Label(questionsButtons[0]);
if(GUILayout.Button(answerButtons[0]))
{
GUILayout.Label(questionsButtons[1]);
if(GUILayout.Button(answerButtons[3]))
{
GUILayout.Label(questionsButtons[3]);
Dialog = false;
Enable_Mouse();
}
}
if(GUILayout.Button(answerButtons[1]))
{
GUILayout.Label(questionsButtons[2]);
Dialog = false;
Enable_Mouse();
}
}
GUILayout.EndArea();
}
void OnTriggerEnter () {
Dialog = true;
Disable_Mouse();
}
void OnTriggerExit () {
Dialog = false;
Enable_Mouse();
}