Lua API
On this page

ACRunStraightToAction

Inherits from

Run your character i a straight line to the specified position. This will first attempt to set the correct heading, then run there. It does not do any collision detection our routing. It just naively moves your character towards the position specified, until it is within the specified accuracy.

Fields:

Accuracy number

read only

The accuracy in units to allow, when detecting finished.

ActionType ActionType

read only

Coordinates Coordinates

read only

The Coordinates to run to

CurrentRetryCount number

read only

The current number of retries this action has needed.

Error ActionError

read only

The error this action currently has, if any

ErrorDetails string

read only

More details about the error, if available

FinishedAt DateTime

read only

The datetime (utc) that this action was finished at. Check IsFinished first.

IsFinished boolean

read only

True if this action is finished

IsRunning boolean

read only

True is this action is currently running

IsRunningPreconditions boolean

read only

True is this action is currently running preconditions

IsStarted boolean

read only

True is this action has been started

Name string

read only

Friendly name of this action. Used for debugging.

Options ActionOptions

read only

Options for this action

Priority number

The priority of this action. Higher number is higher priority

StartedAt DateTime

read only

The datetime (utc) that this action was started at. Note that this is not updated until preconditions have all ran.

Success boolean

read only

Wether or not this action was successful. Check IsFinished before checking this.

Timeout TimeSpan

read only

Timeout length of this action. Set this in Options.

Constructors:

New(coords: Coordinates, accuracy?: number = 1, options?: ActionOptions = nil) :

Parameters:
NameTypeDefaultSummary
coordsCoordinates
accuracynumber1
optionsActionOptionsnil

Methods:

Await() : QueueAction

Returns:QueueAction

GetPropertyKeys() : string[]

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

Returns:string[]

ToString() : string

Returns a string that represents the current object.

Returns:string