Lua API
On this page

Coordinates

Inherits from

Represents an ingame location

Fields:

EW number

read only

East/West coordinate

LandCell number

Landcell this coordinate object represents

LocalX number

The local X offset within this landcell that this coordinate object represents.

LocalY number

The local Y offset within this landcell that this coordinate object represents.

LocalZ number

The local Z offset within this landcell that this coordinate object represents.

Me Coordinates

staticread only

NS number

read only

North/South coordinate

Z number

read only

Z coordinate.

Constructors:

New() :

New(northSouth: number, eastWeast: number, z: number) :

Parameters:
NameTypeDefaultSummary
northSouthnumber
eastWeastnumber
znumber

New(landCell: number, localX: number, localY: number, localZ: number) :

Parameters:
NameTypeDefaultSummary
landCellnumber
localXnumber
localYnumber
localZnumber

Methods:

DistanceTo(other: Coordinates) : number

Parameters:
NameTypeDefaultSummary
otherCoordinates
Returns:number

DistanceToFlat(other: Coordinates) : number

Parameters:
NameTypeDefaultSummary
otherCoordinates
Returns:number

GetPropertyKeys() : string[]

Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts

Returns:string[]

HeadingTo(end: Coordinates) : number

Parameters:
NameTypeDefaultSummary
endCoordinates
Returns:number

ToString() : string

Returns:string