Skip to content

ground

Represents a ground item.

Members

float DisplayName

Displays name of the grounspawn

int Distance

Distance from player to ground item

int Distance3D

Distance from player to ground item

heading Heading

Ground item is facing this heading

heading HeadingTo

Direction player must move to meet this ground item

int ID

Ground item ID (not the same as item ID, this is like spawn ID)

bool LineOfSight

Returns TRUE if ground spawn is in line of sight

string Name

Name

int SubID

???

int ZoneID

???

float X

X coordinate

float Y

Y coordinate

float Z

Z coordinate

float W

X coordinate (Westward-positive)

float N

Y coordinate (Northward-positive)

float U

Z coordinate (Upward-positive)

ground First

First spawn

ground Last

Last spawn

ground Next

Next spawn

ground Prev

Prev spawn

string To String

Same as ID

Methods

Name Action
DoFace Will cause the toon to face the called for spawn if it exists
DoTarget Will cause the toon to target the called for spawn if it exists
Grab Picks up the ground spawn
Reset Clears the currently selected ground spawn

Examples

Extended the Ground TLO to accept searches

/echo The closest ${Ground[brew].DisplayName} is ${Ground[brew].Distance3D} away from you.

Output:

The closest Brew Barrel is 26.4 away from you.

Note that both of the search functions are case insensitive and are sorted by distance closest to you. The only acceptable parameter in the search filter is by name or partial name.

/echo ${Ground[egg].Doface.Distance3D}

Will face the closest item on the ground which has the word "egg" in it. and then echo the distance to it in the mq2 window. well if it finds an item with the word "egg" in it on the ground that is, otherwise it will just echo NULL .DoFace does NOT target the ground item, it just faces it.

/if (${Ground[egg].DoTarget.ID}) /echo we just targeted a ${Ground[egg]}

Will target the closest item on the ground which has the word "egg" in it. and then echo the distance to it in the mq2 window.

/if (${Ground[1].Doface.Distance3D}) /echo we just targeted a ${Ground[1].DisplayName}

Will face the closest item on the ground. and then echo the distance to it in the mq2 window. well if it finds an groundspawn, otherwise it will just echo NULL .DoFace does NOT target the ground item, it just faces it.