Retain conversation on screen through multiple interactions
Posted: Mon May 24, 2021 12:30 pm
Hiya!
Running through parts of the tutorials here and wondering if this is on the right track or not?
I have one conversation (image attached), and one quest. I've got a bunch of conversation child nodes that are set with conditions based on the status of the quest (condition code written in red next to each node).
I start the conversation in code by using StartConversation and a public field string field using [ConversationPopup] to set the conversation in the inspector. I don't have NPCs in the game to initiate conversations, it's coming through a mobile phone UI interface like texts or DMs.
The "Ok sure!" node as you can see (selected in the inspector) sets the quest state to active, and then as the game determines the quest has been successful I can mark it as a success with QuestLog.SetQuestState("FindBabies", QuestState.Success) (could you confirm that this is the correct way?)
As I return to the conversation during each different quest state, I would like it to remember the previous conversation entries on screen instead of it starting from a clear slate again. Is this possible?
I've looked through the textline example as this seemed to be headed in the right direction but couldn't quite find what I was after. Perhaps it's something to do with utilising the conversation stack but I want to be sure I'm not overthinking it!
Just to be clear the UI output would be something like (using the above example):
> Find me some babies
>> Ok sure!
[player closes UI interface, does a bunch of stuff, opens UI interface and kicks off StartConversation again]
> Still working on it??
>> Yes!
[player closes UI interface, does more stuff, successfully finishing the quest, opens UI interface and kicks off StartConversation again]
> Thank you for finding them!
Bonus question! Could those conversation entries be displayed on screen in reverse order (latest at the top, earliest at the bottom)?
Thank you for your help.
(perhaps it's something more like a "resume conversation" I'm after... just thinking out loud now)
Running through parts of the tutorials here and wondering if this is on the right track or not?
I have one conversation (image attached), and one quest. I've got a bunch of conversation child nodes that are set with conditions based on the status of the quest (condition code written in red next to each node).
I start the conversation in code by using StartConversation and a public field string field using [ConversationPopup] to set the conversation in the inspector. I don't have NPCs in the game to initiate conversations, it's coming through a mobile phone UI interface like texts or DMs.
The "Ok sure!" node as you can see (selected in the inspector) sets the quest state to active, and then as the game determines the quest has been successful I can mark it as a success with QuestLog.SetQuestState("FindBabies", QuestState.Success) (could you confirm that this is the correct way?)
As I return to the conversation during each different quest state, I would like it to remember the previous conversation entries on screen instead of it starting from a clear slate again. Is this possible?
I've looked through the textline example as this seemed to be headed in the right direction but couldn't quite find what I was after. Perhaps it's something to do with utilising the conversation stack but I want to be sure I'm not overthinking it!
Just to be clear the UI output would be something like (using the above example):
> Find me some babies
>> Ok sure!
[player closes UI interface, does a bunch of stuff, opens UI interface and kicks off StartConversation again]
> Still working on it??
>> Yes!
[player closes UI interface, does more stuff, successfully finishing the quest, opens UI interface and kicks off StartConversation again]
> Thank you for finding them!
Bonus question! Could those conversation entries be displayed on screen in reverse order (latest at the top, earliest at the bottom)?
Thank you for your help.
(perhaps it's something more like a "resume conversation" I'm after... just thinking out loud now)