Page 2 of 2

Re: change Actor's name on runtime

Posted: Wed Aug 15, 2018 2:33 am
by mmopulencia
Nevermind this question , found a work around that works , heheh just created a new actor and replaced it on the conversor thing.

Re: change Actor's name on runtime

Posted: Wed Aug 15, 2018 9:53 am
by Tony Li
Okay. The other way (using Display Name) should work. If you want to pursue it in the future, let me know.

Re: change Actor's name on runtime

Posted: Mon Sep 17, 2018 8:56 am
by dragonlord3989
Tony Li wrote: Wed Aug 15, 2018 9:53 am Okay. The other way (using Display Name) should work. If you want to pursue it in the future, let me know.
Hey sorry for the necropost but is there a way to limit the amount of characters one can use in the input box I have this set https://gyazo.com/4d992c3fd45d8feca48dc09d698b7038 how ever when I start the game and the game calls the dialogue script

Code: Select all

SetContinueMode(false);
TextInput(Text Field UI, Name, Name).
it sets the character limit back down to 0

Re: change Actor's name on runtime

Posted: Mon Sep 17, 2018 9:34 am
by Tony Li
Hi,

You can specify the max length as an optional fourth parameter:

Code: Select all

TextInput(Text Field UI, Name, Name, 10)
This allows you to specify a different character limit for each TextInput() command.

If you want to clear the input field, too, you can specify the keyword 'clear' as an optional fifth parameter. For example:

Code: Select all

TextInput(Text Field UI, Name, Name, 10, clear)
Otherwise it will use the current value of the variable "Name" as the input field's starting value.

Re: change Actor's name on runtime

Posted: Mon Sep 17, 2018 10:20 am
by dragonlord3989
Thank you for you quick response.

Re: change Actor's name on runtime

Posted: Mon Sep 17, 2018 8:36 pm
by Tony Li
Glad to help!

Re: change Actor's name on runtime

Posted: Thu Oct 08, 2020 8:14 am
by shortlin
Tony Li wrote: Tue Aug 14, 2018 11:02 pm Hi,

The actor's Name should always remain the same. Instead, change the actor's Display Name. Try this:

1. In the Dialogue Editor window's Actors section, set the actor's Name to Flame.

2. Tick Use Display Name, and set the Display Name to ???.

3. In the dialogue entry node's Script field, use the dropdowns or type this in manually:

Code: Select all

Actor["Flame"].Display_Name = "Flame"
Hi Tony Sorry to put up the question
Does the script "Actor["Flame"].Display_Name = "Flame" still work now?
I tried to type this code in a node's script,the actor's name still not change.

Re: change Actor's name on runtime

Posted: Thu Oct 08, 2020 9:44 am
by Tony Li
Hi,

It works, but not during the same conversation. The Dialogue System caches display names at the beginning of the conversation so it doesn't have to spend time to look up the display name with each node.

If you want to change a character's display name in the middle of a conversation, see the "Discover Name Example" scene in on the Dialogue System Extras page.