Hi, I am making a top down RPG and I am having these errors. It is a script for dialogue:
Here is a script version:
using UnityEngine;
using System.Collections;
public class Dialogue : MonoBehaviour {
public bool Talk;
public bool TextOpt;
public bool LargeOpt;
public int MaxOpt;
public int SelectedOpt;
public int Box;
public int TalkingTarget;
public string Text;
public bool Restart;
void Awake; {
if (Restart) { //If restarting
Box = 0; //put the box to 0
}
DialogBox.Visible = True; //Shows the box (YOU WILL PROBABLY HAVE TO CHANGE)
if (Talk = False Or Dialog <> CurrentDialog) { //If not continuing a dialog
Talk = True; //Then start one
Box = 0; //from the beginning
CurrentDialog = Dialog; //and record what dialog is being started
} ElseIf (Restart = False) { //Otherwise (if continuing)
Box += 1 //Progress a box
}
if (TextOpt = False) { //If it's not a choice,
OptionBox.Visible = False; //Don't show the options.
}
}
//. . . Code to put the correct text into the “text” variable . . .
//I don’t know how you want to do this, maybe from text resource file or a select case?
//You mentioned audio. That would probably have to be controlled in this chunk too then, as well as anything that may change on a box-by-box basis.
DialogBox.Text = Text; //Display the text!
if (Talk = False) { //If no longer talking,
txtDialog.Visible = False; //close the box
}
if (TextOpt = False) { //If there isn't a choice,
txtOption.Visible = False; //Don't show the options
}
