Difference between revisions of "Bot Playground/Events/autopilot started"
From SmartBots Developers Docs
(Created page with "{{DISPLAYTITLE:autopilot_started}} <onlyinclude>Fires when bot autopilot starts. {{NotAvailableForQB}}</onlyinclude> <syntaxhighlight lang="javascript"> Bot.on("autopilot_sta...") |
|||
Line 10: | Line 10: | ||
{{API Variable|name}}The name of the event in this case teleport_status | {{API Variable|name}}The name of the event in this case teleport_status | ||
{{API Variable|bot_name}}The name of the bot teleporting. | {{API Variable|bot_name}}The name of the bot teleporting. | ||
− | {{API Variable|currentPoint}}Bot current location, { X, Y, Z} | + | {{API Variable|currentPoint}}Bot current location, { X, Y, Z } |
− | {{API Variable|endPoint}}Bot destination point, { X, Y, Z} | + | {{API Variable|endPoint}}Bot destination point, { X, Y, Z } |
{{API Variables Table End}} | {{API Variables Table End}} |
Revision as of 10:16, 7 December 2023
Fires when bot autopilot starts. Not available for QubicBot yet (?)
Bot.on("autopilot_started", 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. | ||
currentPoint | Bot current location, { X, Y, Z } | ||
endPoint | Bot destination point, { X, Y, Z } |
Example
console.log(`${process.name} started`);
Bot.on("autopilot_started", (event) => {
console.log(`Autopilot started: ${JSON.stringify(event)}`);
});
/*
Autopilot started: {"name":"autopilot_started","bot_slname":"DakotahRaine Resident","bot_uuid":"4f6b8999-14a0-4f50-882d-a764ee913daa","endPoint":{"X":203,"Y":37,"Z":93},"event_version":2,"system":"SB_PERSONAL","currentPoint":{"X":209.2021,"Y":28.88582,"Z":93.78145}}
*/