Textline Lobby Project in one Scene for AC

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
soc
Posts: 2
Joined: Tue Jul 04, 2023 6:15 pm

Textline Lobby Project in one Scene for AC

Post by soc »

Hello,
i've been trying to add Dialogue System to Adventure Creator.

The Textline Lobby Example is already perfect for what i'm trying to do.
But what's confusing me, is that it's seperated into different scenes, where Lobby has to be Scene 0 and Gameplay 1.
And it's setup with a save system, that i couldn't quite figure out (and don't want to use).

Would it be possible to have in work in one scene, and work just like it does in the example, e.g. in the form of UI's that get enabled/disabled, and how should it be setup?

Examplified: First Person Player presses button "j" brings up a "Menu"/UI that holds the Lobby Canvas from the Example. Pressing one of the names reveals their respective Chat UI. When closing it saves it's state and just stays in the Background (certain Triggers continue the Chat, or reveal new messages with variables) can be opened and closed at will.


I've setup everything for AC according to the Documentation.

Best regards
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Textline Lobby Project in one Scene for AC

Post by Tony Li »

Hi,

It's probably simpler to just use the SMS Dialogue UI that's included in Plugins > Pixel Crushers > Dialogue System > Prefabs > Standard UI Prefabs > Pro > SMS Dialogue UI. Make a menu in AC that starts each conversation. No need for the Textline project.
soc
Posts: 2
Joined: Tue Jul 04, 2023 6:15 pm

Re: Textline Lobby Project in one Scene for AC

Post by soc »

It seems to get paused when using AC Menus, i'll try to figure out how to make it work together.

It does work, when it's unpaused, but the Conversation restarts everytime, even though OnSaveData Applied is being used in the Conversation (i have just copied the script from the SMS Dialogue Example).

And oddly it always starts the second Conversation, i have two "New Conversation 1" and "New Conversation 2", and the buttons are setup accordingly, but it always defaults to Conversation 2.
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Textline Lobby Project in one Scene for AC

Post by Tony Li »

Hi,

Tick the SMS Dialogue UI's Use Conversation Variable checkbox.

Before starting your conversation, set the "Conversation" variable to a value such as "New Conversation 1" or "New Conversation 2". To do this in Lua:

Code: Select all

Variable["Conversation"] = "New Conversation 1"
Or in C#:

Code: Select all

DialogueLua.SetVariable("Conversation", "New Conversation 1");
To resume a conversation, call the SMS Dialogue UI's OnApplyPersistentData() method:

Code: Select all

DialogueLua.SetVariable("Conversation", "New Conversation 1");
// Try to resume New Conversation 1:
(DialogueManager.standardDialogueUI as SMSDialogueUI).OnApplyPersistentData();
// If it's not active, start it fresh:
if (!DialogueManager.isConversationActive) DialogueManager.StartConversation("New Conversation 1");
Post Reply