To set custom player's name in dialogue system.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Yob
Posts: 21
Joined: Sun Aug 06, 2017 11:30 am

To set custom player's name in dialogue system.

Post 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!!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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;
Post Reply