Page 1 of 1

To set custom player's name in dialogue system.

Posted: Sat Jan 20, 2018 9:08 am
by Yob
Hello, tony!

i am now making some dialogues.
everything goes well. but one problem!

at the beginning of the game, player input their nicknames. then, i save in the UserInfo script as "string nickname".

now i want to use the nickname when talking to other character but i don't know how to get this variable from script to dialogue manager. TT.

the conversant are several and their name is fixed. only player's name should get from the c# script.
please let me know! always thanks alot!!

Re: To set custom player's name in dialogue system.

Posted: Sat Jan 20, 2018 12:48 pm
by Tony Li
Hi,

Add an Override Actor Name component to your player. In your script, set the overrideName property:

Code: Select all

using PixelCrushers.DialogueSystem;
...
GetComponent<OverrideActorName>().overrideName = nickname;