So right now I have a pretty basic script for a conversation, problem is, if you click on an answer, I’m not sure how to redirect to different conversation lines other than simply redirecting to another script (by enabling another script and loading it on the object), which seems a bit superfluous.
Here is my script example… right now after you click on a button it simply prints a comment in the console.
using UnityEngine;
using System.Collections;
public class Conversation : MonoBehaviour {
void OnGUI() {
GUIStyle style = new GUIStyle ();
style.richText = true;
GUI.Box(new Rect(0, 0, 400, 200), "");
GUILayout.Label("<size=30><color=white>My greetings to you, earthling</color></size>",style);
if (GUI.Button(new Rect(10, 50, 100, 50), "My greetings to you as well"))
print("You clicked the button!");
if (GUI.Button(new Rect(10, 100, 100, 50), "Earthling? What do you mean, earthling?"))
print("You clicked the button!");
}
}