Lua API
On this page

ACMovement

Inherits from

Movement stuff. This is an experimental api and may change / move in the future.

Fields:

Heading number

read only

Your character's current heading. This uses the phyics position so it should be what the client is showing, but may not line up exactly with what the server things your heading is.

MyPhysicsCoordinates Coordinates

read only

Your character's current physics position. This is the client side value, not neccesarily where the server thinks you are.

Methods:

ClearAllMotions() : boolean

Clear all motions set by this script.

Returns:boolean

Dispose() : nil

Returns:nil

GetMotion(motion: ACMotion) : boolean

Get the status of the specified ACMotion.

Parameters:
NameTypeDefaultSummary
motionACMotion

The ACMotion to get the status

Returns:boolean

GetPhysicsCoordinates(objectId: number) : Coordinates

Get the current physics coordinates of the specified object id. This is the client side value, not neccesarily where the server thinks the object is.

Parameters:
NameTypeDefaultSummary
objectIdnumber

The id of the object to get the physics coordinates of

Returns:Coordinates

GetPropertyKeys() : string[]

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

Returns:string[]

RunStraightTo(coordinates,accuracy,options,callback) coordinates Coordinates , accuracy number , options ActionOptions , callback function

SetHeading(degrees,accuracy,options,callback) degrees number , accuracy number , options ActionOptions , callback function

SetMotion(motion,fOn) motion ACMotion , fOn boolean

ToString()

WalkStraightTo(coordinates,accuracy,options,callback) coordinates Coordinates , accuracy number , options ActionOptions , callback function