Hello! Please help me!
I have special quotes in my conversations. When NPC says them, special quotes must be saved for example in "Application.persistantData/important_quotes.json" file, so then I can read them in my journal of important quotes during the game. So the questions are:
1) How can I mark a dialogue entry as important?
2) How do I know that the dialogue entry has been said right now (by NPC) and I must save it.
3) How can I get these important quotes which just have been said in my C# script to save them to json file?
Sorry for my not very good English) Thank you!
Saving special quotes.
Re: Saving special quotes.
Hi,
When a dialogue entry is said, its Script field runs. You can register a Lua function that writes the quote to your JSON file.
Another approach would be to add the quotes as quest entries in a quest. As each dialogue entry is said, set that quest entry's State to success. This way they're easy to view in the quest log window. This way you don't need to write any code.
When a dialogue entry is said, its Script field runs. You can register a Lua function that writes the quote to your JSON file.
Another approach would be to add the quotes as quest entries in a quest. As each dialogue entry is said, set that quest entry's State to success. This way they're easy to view in the quest log window. This way you don't need to write any code.
-
- Posts: 25
- Joined: Thu Dec 28, 2017 6:06 am
Re: Saving special quotes.
I understood. Thank you! And I have another one question: How can I save a dialogue state? Now, if I talk to NPC and exit the game, and again talk to NPC I have the dialogue again. I need to talk to NPC once, if I try to talk to him again, we must have the another conversation. Thank you
Re: Saving special quotes.
Hi,
Use a dialogue database variable or SimStatus to record that the player has talked to the NPC. Then check this in the Conditions field of a dialogue entry node or the Condition section of your trigger component.
Dialogue database variables and SimStatus are in the dialogue state. To save the dialogue state, use the Dialogue System's save system. The easiest way is to use the AutoSaveLoad component on the Dialogue System Extras page. If you want more flexibility than AutoSaveLoad, read the save system link. Let me know if you have any questions about it.
Use a dialogue database variable or SimStatus to record that the player has talked to the NPC. Then check this in the Conditions field of a dialogue entry node or the Condition section of your trigger component.
Dialogue database variables and SimStatus are in the dialogue state. To save the dialogue state, use the Dialogue System's save system. The easiest way is to use the AutoSaveLoad component on the Dialogue System Extras page. If you want more flexibility than AutoSaveLoad, read the save system link. Let me know if you have any questions about it.