Skip to content

Unit Control

ucontrol commands whichever unit is sitting in @unit. It has no field for a unit of its own and cannot have one: ubind first, then the order.

The first field chooses what exactly to do, and the rest depend on it: for move they are coordinates, for itemTake a store, an item and an amount, for flag a number to tag with. There are about twenty commands in all, and they fall into four groups: movement, shooting, items, and work — mining and building.

  1. Movement and stoppingCoordinates in tiles, an order that lasts ten seconds, and «stop» that does not mean «freeze»
  2. Arrival: withinA unit will never stand exactly on a point. The question to ask is not «is it there» but «is it close»
  3. Items: take and dropA unit is a portable storage slot: one kind of item, a few places and a compulsory delay between trips
  4. The flag as a tagEvery unit has a number the game never uses. Without it two processors will pull one squad apart
  5. MiningNot everyone mines and not everything is minable, and they mine from where they stand — reaching the tile is the unit's own problem
  6. Who is driving the unitA unit obeys whoever commanded it last. Two properties tell you who that is right now

«Binding by type» — without @unit no order does anything. The lessons will tell you the rest themselves.

Unofficial fan project, not affiliated with Anuke. Mindustry sprites, fonts and translations © Anuke, used under GPL-3.0; Fira Code under OFL-1.1. Site code is GPL-3.0.