Forum rules - please read before posting.

Adding sprite/UI next to the speech bubbles(subtitles)

In our game we have obligatory dialogues. We implemented that feature with changing speechManager's screenTimeFactor variable;
KickStarter.speechManager.screenTimeFactor = timeScale;
What we do is literally giving a hour in length for the timescale so that player has to click in the screen as a validation to skip the dialogue, to make sure that they definitely read the dialogue.

Now we want to add a indicator which implies that this is a obligatory dialogue and player has to click the mouse in order to skip it. We want this indicator to be shown right next to the speech bubble UI OR if possible inside the UI at the bottom right corner.

I am kind a lost on how to overcome this issue without modifying the AC's code itself. Is there any possibilities to do this with custom actions?

Comments

  • edited April 2020

    You can use AC.SpeechManager.displayForever instead. If you set it to true, the player has to click.

    Are you using Unity UI Prefab for the subtitles menu? You can have anything you want in the UI. You can add your indicator object and either make it invisible or turn the object off.

    Then you would put a script somewhere (the canvas root object for example) and you would check the AC.SpeechManager.displayForever variable when the menu is opened and show/hide your indicator.

    Note: The code can be technically anywhere as you can access the objects via runtimeCanvas of the menu.

    Edit: Ah, didn't noticed one thing. ALL dialogues are obligatory? In that case you do not need any script. Just set displayForever to true (It should be somewhere in the speech settings tab) and add your indicator to the menu.

  • @Keks

    Thanks for the reply, yeah the method totally makes sense thank you for your suggestion! Btw, there was a mistake probably. Not all the dialogues are obligatory, only the story-wise important ones are obligatory. Didn't noticed there was a bool under Speech Manager as displayForever I could simply make a check for that bool. Thank you so much!

  • Welcome to the community, @FlyingTurtle.

    The "displayForever" property is available in the Manager under the Display subtitles forever until user skips it?. A separate option is also available for narration.

    It's also possible to have speech "end", but the text itself remain, by inserting the [hold] tag into the speech text itself. This can be useful when e.g. keeping the last speech line displayed before showing Conversation options. More on this topic can be found in the Manual's "Text tokens" chapter.

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.