autopilot_stuck
From SmartBots Developers Docs
Revision as of 10:21, 7 December 2023 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:autopilot_stuck}} <onlyinclude>Fires when bot autopilot gets stuck and gives up moving further. {{NotAvailableForQB}}</onlyinclude> See Bot Playground/Comman...")
Fires when bot autopilot gets stuck and gives up moving further. Not available for QubicBot yet (?)
See Bot.walkTo() command for autopilot usage.
Bot.on("autopilot_stuck", function(event) { ... });
Reference
This event comes with the following event object:
Variable | Required | Description | |
---|---|---|---|
event object properties: | |||
name | The name of the event in this case teleport_status | ||
bot_name | The name of the bot teleporting. | ||
endPoint | Bot planned destination point, { X, Y, Z } | ||
actualPoint | Bot actual location, { X, Y, Z } |
Example
console.log(`${process.name} started`);
Bot.on("autopilot_stuck", (event) => {
console.log(`Autopilot stuck: ${JSON.stringify(event, null, 2)}`);
});
/*
Autopilot stuck: {
"name": "autopilot_stuck",
"bot_slname": "DakotahRaine Resident",
"bot_uuid": "4f6b8999-14a0-4f50-882d-a764ee913daa",
"endPoint": {
"X": 212,
"Y": 25,
"Z": 93
},
"actualPoint": {
"X": 203.21446,
"Y": 36.776222,
"Z": 93.68485
}
}
*/