Query Database for Line Count / Character
Posted: Fri Nov 06, 2020 12:44 am
Is there a way to run queries against a dialogue database to get statistics like lines per character?
Support and discussion forum for Pixel Crushers products
https://www.pixelcrushers.com:443/phpbb/
https://www.pixelcrushers.com:443/phpbb/viewtopic.php?t=3753
Code: Select all
int actorID = database.GetActor("Player").id;
int numLines = 0;
foreach (var conversation in database.conversations)
{
foreach (var entry in conversation.dialogueEntries)
{
if (entry.actorID = actorID) numLines++;
}
}
Debug.Log("Lines spoken by player: " + numLines);