Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

CharacterBotTurn

A turn of a bot whose player controls a character: what the characters bot’s movement reads, a destination and the dangers.

Property Type Description Overrides
character Entity The bot’s character, which its player controls. BotTurn.character
controlled readonly Entity[] Every entity its player controls, as the room last told the bot, in the order they were spawned. -
input BotInput The bot’s input for the ticks to its next move. -
moveSeconds number Seconds of the room’s time since the bot’s last move: one of the room’s send intervals, since it moves on each send. A speed read from two moves divides by it. -
player Entity | null The bot’s player entity in it: null before the stream brings it. -
send (name, payload?, options?) => void Sends the room one of the game’s commands, by its plugin.key name: what a page’s button or key sends, each entity field as the key the dump files the entity under. A command declared entity: true names the entity it acts through in entity, one of controlled, such as its character: a room’s bot knows no declaration, so it sends none it is not given. Its result comes to the bot’s page as any command’s does. -
world World The room’s world as the bot’s page stream holds it: every entity the room streams, with the game’s own traits. -