Page 1 of 1
Show and auto select conversations with one response
Posted: Tue Jan 21, 2020 1:51 am
by ko_games
Is there a way to not have to select a response in the menu when it appears? For example, if an NPC makes a comment how do I show the player response and then switch back to the NPC for their next response automatically without needing to click on the response or push a button? I'm referring to conversations where there is just one response and not multiple choices. I tried deselecting the always force menu checkbox, but then this skips the player's response and only shows the NPC responses. Basically, if I want the player and the NPC to have an auto conversation without any input from the player.
For reference, I'm using the basic standard dialogue UI prefab for the dialogue UI. On another similar note, is there a way to make the player response use the typewriter effect like the NPC?
Re: Show and auto select conversations with one response
Posted: Tue Jan 21, 2020 9:19 am
by Tony Li
Hi,
Inspect the Dialogue Manager GameObject. Untick Display Settings > Input Settings > Always Force Response Menu. Tick Subtitle Settings > Show PC Subtitles During Line.
If the player only has one response, the settings above will show that response as a subtitle using the player's subtitle panel. If you want a specific response to appear in a menu even if it's the only one available, include the markup tag "[f]" in its text. If you want to force a specific response to bypass the menu even if more than one response is available, include the markup tag "[auto]".
Re: Show and auto select conversations with one response
Posted: Sat Jan 25, 2020 3:51 am
by ko_games
This worked perfect! The only issue I'm having now is I can't get the dialogue system events to trigger. They were working before I switched those settings. Now the on conversation start and end events aren't working. I was using the on conversation start and end to hide and unhide parts of the UI. I'm sure I'm missing something, but I'm not sure what it is? Thanks again for your help!
Re: Show and auto select conversations with one response
Posted: Sat Jan 25, 2020 4:33 am
by ko_games
Disregard that last message. I figured out what the problem was. I changed my player's actor name in the dialogue window. From what I now understand, if the actor name doesn't match the gameobject name it won't call the event. I added a dialogue actor component to my player and assigned the new actor name. Now it works. I had assigned the player as the conversation actor under start conversation in the dialogue system trigger, but it still wasn't working. Is this because when you assign a gameobject to this field it just checks that gameobject's name to see if it matches the actor? See screen shot.
Re: Show and auto select conversations with one response
Posted: Sat Jan 25, 2020 7:20 am
by Tony Li
Hi,
If you assign a GameObject to the Dialogue System Trigger's Conversation Actor or Conversation Conversant field, that GameObject should be used as the actor or conversant, and that GameObject should receive events. If you assigned the Player GameObject to the Conversation Actor field, its Dialogue System Events component should have received events.
If a field is unassigned, it will look for a GameObject with a DialogueActor component whose Actor dropdown matches the character in the conversation.
If it doesn't find a GameObject with a matching DialogueActor component, it will look for a GameObject whose GameObject name matches the character in the conversation.
More info:
Character GameObject Assignments
Re: Show and auto select conversations with one response
Posted: Sun Jan 26, 2020 2:22 am
by ko_games
Thanks Tony! That makes sense.
Re: Show and auto select conversations with one response
Posted: Sun Jan 26, 2020 8:12 am
by Tony Li
Glad to help!