Skip to content
Rubens de Oliveira Moraes Filho edited this page Apr 26, 2021 · 22 revisions

This command is responsible for build structures as Base and Barracks.

Standalone application

Used as a single command, build sends free units (units that have not received actions) to build a <quantity> of structures of type <type> in the cell located on the <direction> next to the unit. Build can be interpreted (composed) as:

build(<type>,<quantity>,<direction>)

The option Type defines if you want to build a Base or a Barrack. The command will try to build how many structures the quantity parameter defines, considering how many resources your player has. The option direction is based on the position of the worker that will be selected to perform the action. The picture below shows one worker building a Barrack in the UP direction.

Build Work

Combined with Loop (For)

Build can be used inside of the for structure by adding a <unit> parameter into the parameter list. It changes the command a little, as the example below:

build(<type>,<quantity>,<direction>,<unit>)

When build receives a <unit> as a parameter, the command will try to use the specified unit to construct a new structure of the type defined by <type>. If the build command is able to set up the action for the specific unit, it will return a command for the unit. If not, any action will be returned.

Build Representation

Clone this wiki locally