Update Actor's name

Announcements, support questions, and discussion for the Dialogue System.
Mahaut
Posts: 14
Joined: Sat Oct 10, 2020 1:21 pm

Update Actor's name

Post by Mahaut »

Hello,
It's me again :)

I have some troubles with character names: I would like to update Actor names but it does not seem to work.
This is my situation:

At the beginning the Displayed name of the Conversant is "Unknown", the corresponding actor name is "TheGirl".
Then, I use this to modify, as a "script" in a dialogue node: "Actor["TheGirl"].Display_Name = "Anna""
But here, I have two issues:
1/ the Actor name is still "Unknown" in the UI (as I choose to display the Actor's name in a special box),
2/ in the text, while I use "Hello [var=TheGirl]" (or Hello [var=Conversant] ) are still "unknown" or "nil".

Because it seems to be very basic, I assume that I'm missing something obvious. Could you help me, telling me why the variable is not updated ?
Thanks!
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Update Actor's name

Post by Tony Li »

Hi,

Please see the "Discover Name Example" on the Dialogue System Extras page. This shows how to change the name and have it immediately reflected in the UI. (The active conversation caches the characters' names, so you need to update the cache.)

To include the actor's Display Name, use: "Hello [lua(Actor["TheGirl"].Display_Name)]."
Mahaut
Posts: 14
Joined: Sat Oct 10, 2020 1:21 pm

Re: Update Actor's name

Post by Mahaut »

Thank you, it works really well :)
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Update Actor's name

Post by Tony Li »

Happy to help!
Mahaut
Posts: 14
Joined: Sat Oct 10, 2020 1:21 pm

Re: Update Actor's name

Post by Mahaut »

I have another question
(I don't know if you prefer us to create a special topic for each subject).

My Situation: I use the Textline UI. After the first conversation ends, I use a Playmaker fonction to trigger a button which allows the player to start a new conversation.
I would like to know if is possible to add this conversation (the second one) directly on the bottom of the previous conversation. Like "keeping an history of the first conversation".
Currently, once a conversation ends, the conversation is removed.

Another bonus question: I trigger this button through a FSM command on the Dialogue Sytem Trigger: it works well if I uncheck "Dont deactive the Main Panel" (in the Textline UI), but if the checkbox is cheked, then the button appears grey-out. Do you know why?

Thank you for all your replies, and sorry for all these questions :)
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Update Actor's name

Post by Tony Li »

Hi,
Mahaut wrote: Sun Oct 25, 2020 8:57 amMy Situation: I use the Textline UI. After the first conversation ends, I use a Playmaker fonction to trigger a button which allows the player to start a new conversation.
I would like to know if is possible to add this conversation (the second one) directly on the bottom of the previous conversation. Like "keeping an history of the first conversation".
Currently, once a conversation ends, the conversation is removed.
If you can link the first conversation to the second one, it can continue to run as one conversation. To link one conversation to another in the Dialogue Editor, inspect the last node of the first conversation. From "Links To:", select "(Another Conversation)".

If you can't do that, you'll need to modify the Textline UI code or write your own replacement.
Mahaut wrote: Sun Oct 25, 2020 8:57 amAnother bonus question: I trigger this button through a FSM command on the Dialogue Sytem Trigger: it works well if I uncheck "Dont deactive the Main Panel" (in the Textline UI), but if the checkbox is cheked, then the button appears grey-out. Do you know why?
Sorry, I don't have enough details to provide an answer. But if the button is inside the main panel, then it should disappear when the dialogue UI deactivates the main panel.
Mahaut
Posts: 14
Joined: Sat Oct 10, 2020 1:21 pm

Re: Update Actor's name

Post by Mahaut »

If you can't do that, you'll need to modify the Textline UI code or write your own replacement.
I see, I will try, thank you :)
Sorry, I don't have enough details to provide an answer. But if the button is inside the main panel, then it should disappear when the dialogue UI deactivates the main panel.
In fact, I try to put the Button in several places but none works haha. Never mind, I find something, exploring Playmaker :)

Another very quick question: I've read that a TextMesh Pro package exists (with a demo), but I can't find it. Do you now if it still exist somewhere?
Image
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Update Actor's name

Post by Tony Li »

TextMesh Pro integration is built into the Dialogue System. You don't have to import any packages. Instead, just turn on TextMesh Pro Support.
Mahaut
Posts: 14
Joined: Sat Oct 10, 2020 1:21 pm

Re: Update Actor's name

Post by Mahaut »

Oh sorry, I forgot to say thank you :)
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Update Actor's name

Post by Tony Li »

No problem; happy to help!
Post Reply