Page 1 of 2
Two instances of DM
Posted: Mon May 27, 2019 10:52 am
by Escara
Hi Tony
I hope you're well.
I was wondering how to go about having 2 different versions of DM in my game please.
My default setting is to have the PC, NPC and Response Panels displayed middle bottom of the scene but in some scenarios I need it positioned at the top middle of the screen.
I duplicated the in-scene version and positioned the panels where I want them which is great, however, is there way for me to switch between them when I need to? I don't seem to be able to save the new copy as a prefab either. I can't see anything that's like an 'enable Dialogue' for this as in AC. I see there is a 'remember Dialogue System'. Is the best way to use the 'Add or Remove' Object action list for this? Or is there a better way?
Many thanks
Caroline
Re: Two instances of DM
Posted: Mon May 27, 2019 10:55 am
by Escara
I've just noticed your Highlander comment. So I should have only one DM so I need a way to switch between the panels when needed. I honestly haven't got a clue how to go about that.
Re: Two instances of DM
Posted: Mon May 27, 2019 11:18 am
by allisonrose
Hey! I'm not Tony, but I may be able to help as I'm doing exactly what you are doing - I have multiple subtitle panels that are located in different spots (and have different appearances) and I switch between them in conversation using the SetPanel sequencer command.
So I basically made an instance of the UI in my hierarchy, duplicated a subtitle panel, and re positioned it to where I wanted it to be.
Then when you select your Dialogue UI in the hierarchy, you'll see the Standard Dialogue UI component. This is where you assign your newly created subtitle panel to be associated with a number. So then when you want to change this subtitle panel during a conversation, put something like this in the sequencer:
Where Narrator is the actor, and 3 is the number of the subtitle as assigned in the previous component.
Note that you have to set the panel in the node BEFORE you want them to start speaking.
If Tony knows a better way, he can chime in. But this has worked for me!
Re: Two instances of DM
Posted: Mon May 27, 2019 11:33 am
by Tony Li
Thanks, @allisonrose! That's exactly what you do. Duplicate a subtitle panel and assign it to the Standard Dialogue UI component's Subtitle Panels list. It will have a number in this list (0, 1, 2, etc.). If you always want a character to use a specific subtitle panel, add a Dialogue Actor component to the character's GameObject, and set Dialogue UI Settings > Subtitle Panel Number.
If you want to change the panel a character uses going forward, use the
SetPanel() sequencer command that allosonrose mentioned.
If you want to use a specific panel only for a single dialogue entry node, use the
[panel=#] markup tag.
If you want a character to use an entirely different dialogue UI -- and not just a specific subtitle panel in your regular UI -- then add an
Override Dialogue UI component to the character's GameObject, and assign the dialogue UI you want it to use. It can be a dialogue UI in the scene or a prefab.
Re: Two instances of DM
Posted: Mon May 27, 2019 12:20 pm
by Escara
Thank you both!
I think the ' SetPanel() sequencer command is the one I want.
Sometimes in the scene I'll want the panels to appear above them during conversations because when they're below they cover up the Player and NPC. But only sometimes.
So in the Sequencer at the START of the conversation I would type:
Code: Select all
SetPanel(Dawes,2); SetPanel(Dink,3);
1. Or is there a better place to type this?
2. Or should I not use the actors names but use 'PC Subtitle Panel Above' etc?
A few more questions.
3. I've duplicated the Response panel and increased the Menu panel size to 2 and assigned that. How do I assign this?
4. How to revert back to the default panels? Similar set up?
Thanks again,
Caroline
Re: Two instances of DM
Posted: Mon May 27, 2019 12:25 pm
by Escara
I've just seen the Set Response Panel tick box!
Re: Two instances of DM
Posted: Mon May 27, 2019 1:19 pm
by Escara
Hmm, I'm still having issues. Do I need to create an AC action list 'Third Party Dialogue System Sequencer Message' before the conversation starts? It's weird as the new positions kick in on the second conversation only.
I still can't seem to be able to switch to the new response menu either.
Any help much appreciated.
Thank you
Re: Two instances of DM
Posted: Mon May 27, 2019 4:32 pm
by Tony Li
Hi Caroline,
I just tested without AC and my test scene works. I'll put together an AC scene to make sure it works there. Then I'll send you the test scene so you can compare it with your own scene.
Re: Two instances of DM
Posted: Mon May 27, 2019 8:57 pm
by Tony Li
Hi Caroline,
Here's an example:
DS_AC_SetPanel_Example_2019-05-27.unitypackage
It's based on AC's 2D Demo. To play it, you'll need to import the package, inspect the 2D Demo's ManagerPackage, and click
Assign managers. When you're done, remember to inspect your own game's ManagerPackage and click
Assign managers again.
If you click on the bird, it will start a conversation. To make the bird appear, you'll need to pick up the worm and put it on the bench. You can press 'i' (Interrupt) to skip the intro cutscene and the putting-worm-on-bench cutscene.
Here are some notes I jotted down when setting up the scene:
- Make sure your characters have Dialogue Actor components. I added an instance of the player prefab, Brain2D, to the scene so I could add a Dialogue Actor to it. Then I set it to menu panel 1. I also added a Dialogue Actor to the Bird.
- Assign your new subtitle panels to your dialogue UI's Subtitle Panels list, and your new menu panels to the Menu Panels list.
- This one is the key, and it tripped me up at first, too: The <START> node should almost always be treated as an empty pass-through node. Don't put the SetPanel() sequencer command in its Sequence field. Instead, link <START> to a blank node, and put the SetPanel() sequencer command in the blank node's Sequence. If you use a continue button, add a Continue() command to the Sequence, too. Then link that blank node to your first real conversation node. (Despite the big yellow warning that I myself programmed onto the <START> node, I ignored the warning at first and put the sequencer command on it. )
Re: Two instances of DM
Posted: Tue May 28, 2019 1:35 pm
by Escara
Thanks Tony, you are a star.
Everything is working how I wanted now. For reference this is the sequence I used in the empty node:
Code: Select all
SetPanel(Dawes,2); SetPanel(Dink,3); SetMenuPanel(Dawes,1); Continue()