Lua API
On this page

ACDecalD3D

Inherits from

ACClient stuff, for scripting

Constructors:

New() :

Methods:

ColorToVec4(col: number) : Vector4

Parameters:
NameTypeDefaultSummary
colnumber
Returns:Vector4

Dispose() : nil

Returns:nil

GetPropertyKeys() : string[]

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

Returns:string[]

MarkCoordsWith2DText(lat: number, lng: number, z: number, text: string, color: number, font?: string = Arial) : DecalD3DObj

Draw 2D text at the specified coordinates. Dispose the returned DecalD3DObj to destroy it.

Parameters:
NameTypeDefaultSummary
latnumber

The worldspace latitude to point at

lngnumber

The worldspace longitude to point at

znumber

The worldspace z (altitude) to point at

textstring

The text to draw

colornumber

The color of the text, #AARRGGBB

fontstringArial

The name of the font to use

Returns:DecalD3DObj

MarkCoordsWith3DText(lat: number, lng: number, z: number, text: string, color: number, font?: string = Arial) : DecalD3DObj

Draw 3D text at the specified coordinates. Dispose the returned DecalD3DObj to destroy it.

Parameters:
NameTypeDefaultSummary
latnumber

The worldspace latitude to point at

lngnumber

The worldspace longitude to point at

znumber

The worldspace z (altitude) to point at

textstring

The text to draw

colornumber

The color of the text, #AARRGGBB

fontstringArial

The name of the font to use

Returns:DecalD3DObj

MarkCoordsWithIcon(lat,lng,z,icon) lat number , lng number , z number , icon number

MarkCoordsWithShape(lat,lng,z,shape,color) lat number , lng number , z number , shape DecalD3DShape , color number

MarkObjectWith2DText(objectId,text,fontName,color) objectId number , text string , fontName string , color number

MarkObjectWith3DText(objectId,text,fontName,color) objectId number , text string , fontName string , color number

MarkObjectWithIcon(objectId,icon) objectId number , icon number

MarkObjectWithShape(objectId,shape,color) objectId number , shape DecalD3DShape , color number

NewD3DObj()

PlayObjectScript(objectId,script,intensity) objectId number , script PScriptType , intensity number

PointToCoords(lat,lng,z,color) lat number , lng number , z number , color number

PointToObject(objectId,color) objectId number , color number

SetObjectTransparency(objectId,transparency) objectId number , transparency number

ToString()

Vec4ToColor(v4) v4 Vector4