# Bos Wars Scripting API: Limits

Bos Wars FAQ PREV NEXT LUA Index

DefineUnitAllow DefineAllow

## Functions

### DefineUnitAllow(name, N, N, N, N, N, N, N, N, N)

Define how many units of a given type each player can have.

name
  Name of an unit-type.
N
  The maximum number of units of th given type allowed for the player. There's a number for each player. The first is player 0 and the last is player 8.

#### Example

        -- Allow 1 assault unit for the 2nd player.
        DefineUnitAllow("unit-assault", 0, 1, 0, 0, 0, 0, 0, 0, 0, 0)

### DefineAllow(name, str9)

Define which unit types are allowed for each player.

name
  Name of the unit type.
str9
  The initial allow state for the upgrade at level start:
  - A - Allowed
  - F - Forbidden
  There is one letter per player. The first applies to player 0 and the last applies to player 8.

#### Example

        -- Allow assault units all players.
        DefineAllow("upgrade-metal", "AAAAAAAAA")

All trademarks and copyrights on this page are owned by their respective owners.