User Tools

Site Tools


modding:function:objgetname

Discuss this page on this page's Talk Page

objGetName

See objGetName at Xelerus

Syntax (objGetName spaceObject [nameflags]) → string
Arguments spaceObject: The space object that you want the name from.
[nameflags]: An optional naming code
Returns string: The name of the space object.
Category name, spaceObject
Description Returns the name of space object. You can provide flag(s) to indicate how you want the name formatted.

Example

(objGetName gplayerShip)

Returns the name of the player ship.

(objGetName gplayerShip 2)

Returns the pluralized name of the player ship.

Name flags

These flags are used for controlling the formatting of names of items, ships and stations. Flags can be added together to create a certain formatting, ie. 3 would be pluralized and capitalized.

1 - capitalize
2 - pluralize
4 - prefix with 'the' or 'a'
8 - prefix with count

Taken from Name Flags Legend

Return to Functions list

modding/function/objgetname.txt · Last modified: 2014/12/27 04:40 by 127.0.0.1