Hi,
I would like to change the displayed names of my actors and conversants in specific dialogues, but can't really find a way to do it properly.
To make it easier to understand, in the dialogue database I have a few actors.
Let's say Actor A and Actor B.
In general I would like to display their names in most of the dialogues as set in the database (A and B), but in certain exceptional dialogues I want use these same actors and only change their displayed names during the dialoguess to something else (A and B for example).
What would be a good way to do that?
Thanks!
Dynamic Actor/Conversant Name
Re: Dynamic Actor/Conversant Name
Simply adding this script to a node didn't seem to solve the situation.
Actor["Player_X"].Name = "My Custom Name";
Actor["Player_X"].Name = "My Custom Name";
Re: Dynamic Actor/Conversant Name
Actor["Player_X"].Display_Name = "My Custom Name"
was the other thing I've tried (most likely much closer to what I want to do), and actually it seems both are working, but not initially.
If you trigger the conversation the second time it works, but in my case that's not really ideal.
Is there any way to display the set name in the first conversation as well correctly?
I set the script on the start node, but still no luck.
was the other thing I've tried (most likely much closer to what I want to do), and actually it seems both are working, but not initially.
If you trigger the conversation the second time it works, but in my case that's not really ideal.
Is there any way to display the set name in the first conversation as well correctly?
I set the script on the start node, but still no luck.
Re: Dynamic Actor/Conversant Name
Got it, must set it from the dialogue trigger before starting the conversation and not from the dialogue editor through a sequence.
Now it seems to be working fine.
Now it seems to be working fine.
Re: Dynamic Actor/Conversant Name
Sounds good. Yes, conversations identify the primary actor & conversant GameObjects when the conversation starts, so they should be set in the Dialogue System Trigger.
Re: Dynamic Actor/Conversant Name
Thanks!
One more extra question.
Is it possible to set the name with this approach to variable and assign it from a script (for example in case of randomly generated names)?
Thanks!
One more extra question.
Is it possible to set the name with this approach to variable and assign it from a script (for example in case of randomly generated names)?
Thanks!
Re: Dynamic Actor/Conversant Name
Yes. Use DialogueLua.SetActorField():
Code: Select all
DialogueLua.SetActorField("NPC1", "Display Name", "Fred");