Hi,
I am setting [var=Player_Name] somewhere in a conversation.
After it is set, I am using that name for the rest of the game for all conversations.
Should I set its value every time I start the conversation?
player name as variable need to be set for every conversation?
Re: player name as variable need to be set for every conversation?
Hi,
No. Once the variable value is set, it stays set. You only need to set it once.
No. Once the variable value is set, it stays set. You only need to set it once.
Re: player name as variable need to be set for every conversation?
What about applying it to Play Display Name? should I set it every time I start conversation or at least everytime it is Awake() even if its singleton through out the game?
Re: player name as variable need to be set for every conversation?
Hi,
Set the actor's "Display Name" field once. This will be recorded in the Lua environment. When you start a new conversation, or save and load a game, the value will still be there.
Example of setting Display Name in C#:
Example of setting Display Name in Lua (e.g., Script field):
Set the actor's "Display Name" field once. This will be recorded in the Lua environment. When you start a new conversation, or save and load a game, the value will still be there.
Example of setting Display Name in C#:
Code: Select all
DialogueLua.SetActorField("Player", "Display Name", GetVariable("Player_Name").asString);
Code: Select all
Actor["Player"].Display_Name = Variable["Player_Name"]