move
From SmartBots Developers Docs
Revision as of 11:02, 7 December 2023 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Start or stop bot movement and rotations.</onlyinclude> <syntaxhighlight lang="javascript"> Bot.move(instruction, state); </synt...")
Start or stop bot movement and rotations.
Bot.move(instruction, state);
Reference
This command accepts the following parameters:
Variable | Required | Description
| |
---|---|---|---|
Input: | |||
instruction | yes | The movement instruction. One of the following:
| |
state | yes | value which controls the "instruction" completion:
| |
Output: | |||
Function returns a Promise with the following data: | |||
success | bool | true if command completed successfully | |
error | string | error string if command has failed |
Details
This function allows establishing a direct control over bot's movement.
This function may be a bit laggy, and you might find Bot.walkTo() command to be more precise. However, use this command if you want a direct control over the bot's movement.
Related events:
- self_position event will deliver you the bot position while it changes
Examples