Forum rules - please read before posting.

Last subtitle remain on screen during dialogue choices?

Hey!

We are testing if we can implement this feature. I thought it was just a toggle in-built into AC, but I misread the functionality in the Speech settings. Is this possible?

And one of the problems we foresee is that if both of the UI's are instantiated, the will clash together layout wise if they are too close for diff resolutions/text sizes, is there a way to have the dialogue choices and subtitles on the same prefab without it causing issues?

Or in maybe simpler terms.

Is there an easy way to have dialogue and player responses stacked vertically like a layout group would?

Cheers

Comments

  • To clarify here is an example from The Witcher

    https://imgur.com/4WNbde4

    which has the last line retained.

  • A subtitle line can remain on-screen once the character has finished speaking it through use of the [hold] tag. It will then remain until you use the Dialogue: Stop speech Action to end it - see the Manual's "Text tokens" chapter for more.

    You can also end it through scripting, by calling the Dialog component's KillDialog function.

    Is there an easy way to have dialogue and player responses stacked vertically like a layout group would?

    v1.70 introduced the "Auto Correct UI Dimensions" component, which causes Unity UI-based Menus to be positioned according to anchor points relative to the screen.

    You could feasibly have such a component on separate Subtitle and Conversation menus, set to the same anchor point, but give each menu a different alignment.

    For example, if you set both anchor points to min/max = 0.5, 0.5, then both would be anchored to the centre of the screen. But if the Subtitle's RectTransform boundary was then aligned to the top, and the Conversation's was aligned to the bottom, then neither would overlap.

    It is also possible to rely on a single menu for both, but you'll want to rely on custom events to control when the various elements are displayed. For example, to configure a dialogList element when a Conversation begins:

    using UnityEngine;
    using AC;
    
    public class OverrideConversationExample : MonoBehaviour
    {
    
        private void OnEnable () { EventManager.OnStartConversation += OnStartConversation; }
    
        private void OnDisable () { EventManager.OnStartConversation -= OnStartConversation; }
    
        private void OnStartConversation (Conversation conversation)
        {
            (PlayerMenus.GetElementWithName ("MyMenu", "MyDialogList") as MenuDialogList).OverrideConversation = conversation;
        }
    
    }
    

    You can also similarly control exactly what happens when a line of speech starts/ends by hooking into the OnStartSpeech/OnStopSpeech events. See the "Speech scripting" chapter, as well as this tutorial, for more on events. An event-based approach to speech display may even be preferable to use of the [hold] tag, if you're going for a totally custom UI.

  • Awesome thank you so much Chris <3

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!