GetName(object, int)

From NWN Lexicon
Jump to: navigation, search

Retrieves the name of an object.

string GetName(
    object oObject,
    int bOriginalName = FALSE
);

Parameters

oObject
Object who's name is sought.
bOriginalName
If set to TRUE any new name specified via SetName() is ignored and the original object's name is returned instead. (Default: FALSE)


Description

Returns the first and last name of oObject. In the case of creatures, returns first and last names together as single concatenated string (with a space provided in the middle).


Remarks

GetName() returns the name of modules and areas (pre-1.25 it returned a null string).

If an item is unidentified it returns the unidentified name (ie; what the player will see). You can set an item to identified, get the name, and set it back to undentified in the same script block to get around this.


Known Bugs

Returns "" for stores.


Version

1.67

See Also

functions: 

SetName



 author: Kristian Markon, editor: Lilac Soul, Mistress, additional contributor(s): Simon Damberger, Lilac Soul