Page 1 of 1

Player's Actor ui does not work

Posted: Sat Mar 20, 2021 4:03 pm
by Espes
Hello! With the latest update, the custom UI set in player's actor script does not show. Instead it shows the default ui.
I want to show the player talking to himself by using corgi's conversation zone attached to the player.

Re: Player's Actor ui does not work

Posted: Sat Mar 20, 2021 5:20 pm
by Tony Li
Hi,

The latest update of which asset?

Here's an example that shows the player's subtitles in bubble over the player's head:

DS_CorgiLimitWidthAndPlayerMenu_2021-03-10.unitypackage

You can check it against your own scene. Make sure your player prefab has a Dialogue Actor component. Set Dialogue UI Settings > Subtitle Panel Number to Custom, and assign the bubble prefab/instance.

Re: Player's Actor ui does not work

Posted: Sat Mar 20, 2021 6:28 pm
by Espes
The latest update of Dialogue System. I want Corgi UI to appear over the player when the player talks to himself and when the player is talking to others, the NPC text and answers only to appear over the NPC.

Re: Player's Actor ui does not work

Posted: Sat Mar 20, 2021 6:40 pm
by Tony Li
Did that work in a previous version of the Dialogue System? I don't think anything has changed that would change the behavior. However, if you modified a Dialogue System script, then importing an update would overwrite your modifications.

Here's one way to make it work without scripting:

1. In your dialogue database, define a different actor for when the player talks to himself. For example, name it Monologue. Assign this actor to your monologue conversations.

2. Create an empty GameObject named Monologue.
  • Add a Dialogue Actor component, and set it to Monologue.
  • Add a bubble subtitle panel to Monologue. Name it Monologue Panel.
  • Set the Dialogue UI Settings > Custom Panel to Monologue Panel.
  • Add a Dialogue System Trigger set to OnConversationStart. Select Add Action > Play Sequence. Set the Sequence to something like:

    Code: Select all

    MoveTo(Player Overhead, Monologue Panel)
    where Player Overhead is the position above the player where the bubble should appear.
When a monologue conversation starts, it will find the Monologue GameObject. Its Dialogue Actor component will tell it to use the bubble subtitle panel. The MoveTo() command will move the panel to the player's head.

Re: Player's Actor ui does not work

Posted: Sat Mar 20, 2021 7:16 pm
by Espes
However, if you modified a Dialogue System script, then importing an update would overwrite your modifications.
Maybe I had changed something.

Great! Thank you for your help. I really appreciate it!

Re: Player's Actor ui does not work

Posted: Sat Mar 20, 2021 8:33 pm
by Tony Li
Glad to help!