Hello there!
I'm just starting out with Dialogue System and so far i really like it! However i have encountered a problem.
I want the PC and NPC to have a back-and-forth conversation, but WITHOUT having the PC to choose their lines.
I got the conversation working, but every line said by the PC has to be choosen by the player, which is what i don't want.
Can anyone point me in the right direction?
Thanks in advance!
The Dhel
How to create conversations without choices?
Re: How to create conversations without choices?
Hi!
Inspect the Dialogue Manager GameObject, and untick Display Settings > Input Settings > Always Force Response Menu. Then tick Display Settings > Subtitle Settings > Show PC Subtitle During Line.
If the player only has one response, it will play automatically. Show PC Subtitle During Line shows the player's response as a subtitle.
If you only want this behavior for a specific conversation, instead of applying it globally, inspect your conversation in the Dialogue Editor. If you click on blank canvas space, it will show the conversation's properties in the inspector. There's an override checkbox where you can set the same kind of settings but just for that conversation.
Inspect the Dialogue Manager GameObject, and untick Display Settings > Input Settings > Always Force Response Menu. Then tick Display Settings > Subtitle Settings > Show PC Subtitle During Line.
If the player only has one response, it will play automatically. Show PC Subtitle During Line shows the player's response as a subtitle.
If you only want this behavior for a specific conversation, instead of applying it globally, inspect your conversation in the Dialogue Editor. If you click on blank canvas space, it will show the conversation's properties in the inspector. There's an override checkbox where you can set the same kind of settings but just for that conversation.
Re: How to create conversations without choices?
Hey!
Awesome, that worked perfectly! Thanks so much for the quick reply!
One more thing i was wondering, since i'm building a custom speech UI. Can each player have a different color for the subtitle text?
Awesome, that worked perfectly! Thanks so much for the quick reply!
One more thing i was wondering, since i'm building a custom speech UI. Can each player have a different color for the subtitle text?
Re: How to create conversations without choices?
It's not built in, unless you want to wrap each Dialogue Text in rich text codes or [em#] tags. For example:
ActorSubtitleColor.cs
Or, if you want to define the actor's color in the Actors tab of the Dialogue Editor by adding a custom field for each actor (e.g., "Color"), you can just add one script to the Dialogue Manager instead:
SubtitleColors.cs
- Dialogue Text: "<color=red>Muahaha! I'm eeeevil!</color>"
ActorSubtitleColor.cs
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class ActorSubtitleColor : MonoBehaviour {
public Color subtitleColor;
void OnConversationLine(Subtitle subtitle) {
if (subtitle.speakerInfo.transform == this.transform) {
subtitle.formattedText.text = "<color=" + Tools.ToWebColor(subtitleColor) + ">" +
subtitle.formattedText.text + "</color>";
}
}
}
SubtitleColors.cs
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class ActorSubtitleColor : MonoBehaviour {
void OnConversationLine(Subtitle subtitle) {
var color = DialogueLua.GetActorField(subtitle.speakerInfo.nameInDatabase, "Color").AsString;
subtitle.formattedText.text = "<color=" + color + ">" + subtitle.formattedText.text + "</color>";
}
}
-
- Posts: 74
- Joined: Wed Mar 21, 2018 2:14 pm
Re: How to create conversations without choices?
Hi!
Apologies if this is necroposting, but I wanted to point out that I'm having an issue, as I can't seem to Override Subtitles and\or Input settings properly.
I'm specifically referring to this:
I am able to globally set this on and off in the Dialogue Manager prefab, but the specific conversation Override functions just don't seem to work (or at least the Input Settings one doesn't), apparently.
I'm not sure if there is something I'm doing wrong or not.
If it's of any use: I'm integrating Adventure Creator with Dialogue Manager.
Do you have any advice?
Thanks a lot in advance!
Apologies if this is necroposting, but I wanted to point out that I'm having an issue, as I can't seem to Override Subtitles and\or Input settings properly.
I'm specifically referring to this:
Basically, most of my conversations are supposed to be forcing a Response Menu, but some of them are just one-liners told by the player (e.g. examining an item, the character would say something).Tony Li wrote: ↑Fri May 19, 2017 3:58 pm If you only want this behavior for a specific conversation, instead of applying it globally, inspect your conversation in the Dialogue Editor. If you click on blank canvas space, it will show the conversation's properties in the inspector. There's an override checkbox where you can set the same kind of settings but just for that conversation.
I am able to globally set this on and off in the Dialogue Manager prefab, but the specific conversation Override functions just don't seem to work (or at least the Input Settings one doesn't), apparently.
I'm not sure if there is something I'm doing wrong or not.
If it's of any use: I'm integrating Adventure Creator with Dialogue Manager.
Do you have any advice?
Thanks a lot in advance!
Re: How to create conversations without choices?
Sorry, that's a bug. The conversation override for the Always Force Response Menu checkbox wasn't being observed. A patch is available on the Pixel Crushers customer download site. If you need access, please PM me your Unity Asset Store invoice number. The fix will also be in the next full release.