scanNearbyAvatars
From SmartBots Developers Docs
Revision as of 14:36, 18 October 2022 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Scans current region for other avatars.</onlyinclude> <syntaxhighlight lang="javascript"> const result = await Bot.scanNearbyAva...")
Scans current region for other avatars.
const result = await Bot.scanNearbyAvatars();
Reference
This command accepts the following parameters:
Variable | Required | Description
| |
---|---|---|---|
Input: | |||
Output: | |||
Function returns a Promise with the following data: | |||
success | bool | true if command completed successfully | |
error | string | error string if command has failed | |
avatars | Array | An array containing avatars on sim. Each entry is:
{
// Avatar name
"Name": "GrrrillaBongo Resident",
// Avatar UUID
"UUID": "d8e20552-ca84-4c42-b8d3-e8fa5fbdcc6b",
// The parcel this avatar currently in
"ParcelID": 177,
// If avatar is sitting on something
"Sitting": false
// Position of avatar in-world
"Position": {
"X": 110,
"Y": 75,
"Z": 32
},
// Local position. If avatar is sitting this position is relative to sit parent
"LocalPosition": {
"X": 110,
"Z": 32,
"Y": 75
},
// Avatar heading (the view direction)
"Heading": 0,
// Local heading (for sitting avatars)
"LocalHeading": 0,
// The distance to this avatar
"Distance": 129.97195,
// When we seen this avatar for first time (see Details)
"SeenSince": "2022-10-18T12:36:58.2626463Z",
// How much seconds do we see this avatar
"SeenSeconds: 123,
}
|
Details
Examples
See the Currently worn items scripts in our Playground Examples section.