Arma 2: Construction Interface
Construction Interface (CoIn) is universal system for base construction primarily made for Warfare 2.
Modules (F7) > Construction Interface
Place CoIn module manager where you want to have base center (you can change this position dynamically during the game). You can place as many construction sites as you want.
Every logic is automatically named BIS_coin_#, where # is number starting from 0.
Using synchronisation (F5)
Units with access to given construction site can now be defined using synchronisation F5 and synchronizeObjectsAdd command.
Set Variables to BIS_coin_# with Desired Values
- BIS_COIN_name = <string>; - Name of construction (displayed in action menu and GUI)
- Example: BIS_coin_0 setVariable ["BIS_COIN_name", "Base"];
- Default value: "" (no name)
- BIS_COIN_rules = <array> or <side>; - Rules which defines which units have access to construction. Can be either list of specific units or whole side.
- BIS_COIN_categories = <array>; - List of categories
- Example: BIS_coin_0 setVariable ["BIS_COIN_categories", ["Base","Defence"]];
- Default value: 
- BIS_COIN_items = <array>; - List of items to buy. Preview class (green transparent building) have to be named buildingclass_preview.
Array contains building class, it' price in array (first element is funds' ID - see below, second is actual price; if only price is set, funds' ID will be 0) and display name
- Example: bis_coin_0 setVariable ["BIS_COIN_items", [ //--- Class, Category, Cost or [fundsID, Cost], (display name) ["USMC_WarfareBBarracks", "Base", 200], ["USMC_WarfareBLightFactory", "Base", [0, 300], "Chocolate factory"] ] ];
- Default value: 
- BIS_COIN_funds = <string> or <array>; - Variable(s) which stores amount of funds.
- BIS_COIN_fundsDescription = <string> or <array>; - Variable(s) which stores description of funds types.
- BIS_COIN_areaSize = <array>; - Size of construction area (camera can't move outside of this circle and no building can be build there). Format of array is [radius,height]
- Example: BIS_coin_0 setVariable ["BIS_COIN_areaSize", [50, 20]];
- Default value: [150, 50]
- BIS_COIN_actionCondition = <string>; - String - condition for showing CoIn "Construction" action. If false, action never apperars. Can be changed on fly. Passed arguments: _this, _target.
- Example: BIS_coin_0 setVariable ["BIS_COIN_actionCondition", "(time < 30) && ((damage _this) < 0.5)"]; - construction actions will be visible only till T 30 and to players not damaged too much
- Default value: true
- Note: Use with caution, because action is calculated every frame and complex condition on multiple construction sites can take large amount of reserved scripting time.
- BIS_COIN_onStart = <code>; - Code which is executed when CoIn interface is started. Can be used to update CoIn variables just in time. Passed arguments is [logic]
- BIS_COIN_onSelect = <code>; - Code which is executed when some building type is selected from menu. Passed arguments are [logic, class, preview building]
- BIS_COIN_onPurchase = <code>; - Code which is executed when some building is purchased. Once code is completed, building is constructed. Passed argument is array in format [class,position,direction].
- BIS_COIN_onConstruct = <code>; - Code which is executed when some building is created in the world. Passed argument is array in format [logic, object, class,position,direction].
- BIS_COIN_onRepair = <code>; - Code which is executed when some building is repaired. Once code is completed, building is repaired. Passed arguments are [logic, object].
- BIS_COIN_onSell = <code>; - Code which is executed when some building is sold. Once code is completed, building is deleted. Passed argument is [logic, object]