DataType:ground
Contains all data related to a ground spawn
This Data Type is referenced in MacroQuest, MQ2Map, and accessed by Top-Level Object(s): Ground, ItemTarget, MapSpawn
ground is used as a return type by these members: [ Toggle ]
Page | Member | Description |
---|---|---|
ground | First | First spawn |
Last | Last spawn | |
Next | Next spawn | |
Prev | Prev spawn | |
Search[#|name] | Searches for groundspawn with id or name. If no index is supplied, the nearest groundspawn is returned. |
Members
Type | Member | Description |
---|---|---|
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 | ||
bool | LineOfSight | Returns TRUE if ground spawn is in line of sight |
float | Distance | Distance from player to ground item |
Distance3D | ||
X | Alias W. X coordinate | |
Y | Alias N. Y coordinate | |
Z | Alias U. Z coordinate | |
ground | First | First spawn |
Last | Last spawn | |
Next | Next spawn | |
Prev | Prev spawn | |
Search[#|name] | Searches for groundspawn with id or name. If no index is supplied, the nearest groundspawn is returned. | |
heading | Heading | Ground item is facing this 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) |
SubID | Distance from player to ground item | |
ZoneID | ||
string | DisplayName | |
Name |
Examples
/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.