im writing a damn npc text system again.... i wanna make it less bad than the cute witchy house one but i have run into a dilemma....
here is a sample script....
\if{level < 2}{
Welcome to the KittyPlains. Eat Star Flowers to Level Up and become stronger.
}{
\talk{2}
{You can now jump over the Blocks.}
{Good luck on your quest.}
}
the effect of the "if" command should be pretty intuitive: \if{condition}{text1}{text_2} displays text1 if condition is true, and text2 if condition is false
the "talk" command works like this: \talk{2}{text1}{text2} displays text1 if it is the first time you have talked to the npc, displays text2 if it is the second time, and for further talks it cycles between them
the problem is that i dont actually want the talk command to behave that way. i want it to be aware of branches in the dialogue, and display the first text if it is your first time visiting the particular branch where the talk command appears, the second text the second time, etc. that is, i want it to work this way:
[talk to NPC]
Welcome to the KittyPlains. Eat Star Flowers to Level Up and become stronger.
[level up to level 2]
[talk to NPC]
You can now jump over the Blocks.
[talk to NPC]
Good luck on your quest.
currently what happens is this:
[talk to NPC, first time]
Welcome to the KittyPlains. Eat Star Flowers to Level Up and become stronger.
[level up to level 2]
[talk to NPC, second time, displays second text of the talk command]
Good luck on your quest.
[talk to NPC, third time, cycles back to first text]
You can now jump over the Blocks.
it seems like it will be very hacky and awkward to make the "number of times talked" variable aware of what dialogue branch you are on, and hacky and awkward is exactly what i want to avoid with this text system....
im wondering if a certain vgperson has dealt with this issue before and has a smart solution..... or if anyone else has ideas.....