Page 1 of 1

Create a quick subtitle message directly on screen

Posted: Fri Oct 22, 2021 9:31 am
by Skymix
Hi, I have been searching a way to show a quick temporary message on my game. I want it to be a dialog panel who just come to the screen for a shot moment and pop out. I tried to make a personalized panel for that, but right now I don't know how to change the actual dialogue Ui for another one . It's pretty much the equivalent of a bark, but when I use the bark prefab and add it, It needs to be set on a specific position. I just want to have the message, lock in screen with a sprite of the conversant.

Re: Create a quick subtitle message directly on screen

Posted: Fri Oct 22, 2021 10:11 am
by Tony Li
Hi,

Sounds like you want to show an alert message. You can set up your dialogue UI's Alert Panel to look like a subtitle panel if you want.

There are several ways to show an alert:
  • With a Dialogue System Trigger, select Add Action > Show Alert.
  • Or use the equivalent visual scripting action (e.g., PlayMaker "Show Alert" action).
  • Or, in C#:

    Code: Select all

    DialogueManager.ShowAlert("your message");

Re: Create a quick subtitle message directly on screen

Posted: Fri Oct 22, 2021 10:52 am
by Skymix
Oh, thank you, is it possible with the alert panel to put the conversant sprite?

Re: Create a quick subtitle message directly on screen

Posted: Fri Oct 22, 2021 11:24 am
by Tony Li
Hi,

Alerts are text strings, so they're not associated with an actor.

If you're using TextMesh Pro, you can use a <sprite> tag in your alert text to include an image.

If you want to associate an actor and use its portrait, you could set up a subtitle panel in your dialogue UI. Then play a single-node conversation that's assigned to that actor. Use the [panel=#] markup tag to tell the node to use that panel.

Re: Create a quick subtitle message directly on screen

Posted: Fri Oct 22, 2021 11:45 am
by Skymix
Thank you everything make sense!!

Re: Create a quick subtitle message directly on screen

Posted: Fri Oct 22, 2021 1:03 pm
by Tony Li
Glad to help! :-)