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 Her character, which her player controls. BotTurn.character
controlled readonly Entity[] Every entity her player controls, as the room last told her, in the order they were spawned. -
input BotInput Her input for the ticks to her next move. -
moveSeconds number Seconds of the room’s time since her last move: one of the room’s send intervals, since she moves on each of its sends. A speed read from two moves divides by it. -
player Entity | null Her 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 her character: a room’s bot knows no declaration, so it sends none it is not given. Its result comes to her page as any command’s does. -
world World The room’s world as her page’s stream holds it: every entity the room streams, with the game’s own traits. -