Changing object name
J_J
25 Aug 2018, 01:43I'd like to have npc's originally called a description "a short man" for instance, and once you learn their name have it change to their name in the room description. Is this possible?

DarkLizerd
25 Aug 2018, 03:10npc.alias="a short man"
later...
npc.alias="Mr. smith"
Or it could be: npc.Alias
mrangel
25 Aug 2018, 09:20You can't change an object's name, but you can change its alias.
The name
attribute is what it's called in the code. The alias
is what the player sees.
hegemonkhan
25 Aug 2018, 09:24to add to mrangel's post:
the 'name' String Attribute is the 'ID' for quest
just like no two organisms can have the same DNA, no two same types of things in quest/programming can have the same 'name' Attribute
(while 'ogre.strength' and 'orc.strength' both have the same 'name' String Attribute for their Attribute, they're not the same thing, as one 'strength' Attribute is of the 'orc' Object and the other 'strength' Attribute is of the 'ogre' Object: joe.sex = "male" and jill.sex = "female", are two completely different/separate things, so it's okay for there to be two uses of 'sex' as the 'name' String Attribute of an Attribute, as they belong to two different Objects, it's a bit confusing and complicated... meh. You can't have two 'orc' 'name' String Attribute of Objects, you can't have two 'orc' Objects. You can't have two 'sex' Attributes in/for the same Object)
and once you ID something with a name, it's permanent, you can change something's 'name' as then you screw up the entire ID system of quest... which is a big no no, and thus quest prevents/blocks/restricts you from doing so, lol
J_J
26 Aug 2018, 00:20Where do I put in the change of alias in the code? I'm unsure how I do this.

DarkLizerd
26 Aug 2018, 03:08Where you found out the old man's name...
IE:
You meet an old man in the street...
(npc.alias="old man")
He says, "Hi, my name is George, nice to meet you."
(npc.alias="George")
J_J
30 Aug 2018, 08:41This isn't working. It doesn't work when I just put it into the code or when I put into a msg. Could you show me what it is supposed to look like in the code? Do I just leave the alias section of the character blank, and putting this into the code somewhere and it automatically will change the character's shown name?
Thank you!
J_J
30 Aug 2018, 09:10...Wait, never mind. I had fcked it up. It is working beautifully DarkLizerd. Thank you!