Changing Character Name

SaturnSpaceSquid
04 Dec 2018, 16:30So I have a scenario where my characters are in a dark room and I currently have the alias set to "a dark figure" on the non player character. I want to have it where after they talk to the figure the name changes to Jim and stays that way for the rest of the game. Is there a way to change the name mid game?
hegemonkhan
04 Dec 2018, 17:38add new script -> 'variables' section/category -> 'set a variable or attribute' Script -> (see below)
set variable NAME_OF_YOUR_NON_PLAYABLE_CHARACTER_OBJECT.alias = [EXPRESSION] "Jim"
replace my caps with the 'name' of your non-playable character Object
do this scripting within your 'talk' (or whatever) Verb for that non-playable character Object
jmnevil54
04 Dec 2018, 18:57Code
player.name = "Teddy"
player.alias = "Ted"
npc.name = "Ethan"
npc.alias = "CJ"
mrangel
04 Dec 2018, 19:40(noting that jmnevil's code will generate an error, because you can't change an object's name)
An object's name
is how you refer to it in the code; it is read only within a game, and can only be changed in the editor.
An object's alias
is the name that the player sees, and you can change that the same way you change any other attribute. If you don't set the alias, it will by default be the same as the name.