//determines if line is player choice, NPC dialogue, or the end of the scene void ParseLine() { Debug.Log("Current Script Line: " + lineNum); if (parser.GetName(lineNum) == "end") //end scene, start scene transition { EndDialogue(); } else if (parser.GetCommand(lineNum) == "exit") //exit stage left the current character { playerTalking = false; command = parser.GetCommand(lineNum); characterName = parser.GetName(lineNum); DisplayImages(); } else if (parser.GetName(lineNum) == "Scene") //this line is a scene command { playerTalking = false; command = parser.GetCommand(lineNum); string[] commandData = command.Split(':'); Debug.Log(commandData[0]); SceneCommand(commandData); //some stuff to determine which kind of command it is. commandData! ParseLine(); //re-parses the line and checks it again } else if (parser.GetName(lineNum) != "Player") //character is talking without needed player input { Debug.Log(lineNum); Debug.Log(parser.GetName(lineNum)); playerTalking = false; characterName = parser.GetName(lineNum); dialogue = parser.GetContent(lineNum); Debug.Log(dialogue); pose = parser.GetPose(lineNum); position = parser.GetPosition(lineNum); DisplayImages(); } else //player input needed { playerTalking = true; options = parser.GetOptions(lineNum); CreateButtons(); } }