ArmA 2 Forum, ArmA 2 Home, ArmA 2 Config, ArmA 2 File Formats, ArmA 2 Missions, ArmA 2 3D Modeling, ArmA 2 Scripting, ArmA 2 Terrain, ArmA 2 Texturing, ArmA 2 Tools
Construction Interface (CoIn) is universal system for base construction primarily made for Warfare 2.
Initialization
Startup
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 synchronization (F5)
Units with access to given construction site can now be defined using synchronization (F5) and synchronizeObjectsAdd command.
Optional parameters
Set variables to BIS_coin_# with desired values
Example: BIS_coin_0 setvariable [“BIS_COIN_name”,“Base”];
Default value: “” (no name)
Example: BIS_coin_0 setvariable [“BIS_COIN_rules”,[west,guer_commander]];
Default value: []
Example: BIS_coin_0 setvariable [“BIS_COIN_categories”,[“Base”,“Defence”]];
Default value: []
Array cointains 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: []
Example 1: BIS_coin_0 setvariable [“BIS_COIN_funds”,“money_account”];
Example 2: BIS_coin_0 setvariable [“BIS_COIN_funds”,[“supply_account”,“money_account”]];
Default value: 0
Example 1: BIS_coin_0 setvariable [“BIS_COIN_fundsDescription”,“CZK”];
Example 2: BIS_coin_0 setvariable [“BIS_COIN_fundsDescription”,[“€”,“$”]];
Default value: “$”
Example: BIS_coin_0 setvariable [“BIS_COIN_areasize”,[50,20]];
Default value: [150,50]
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.
Example: BIS_coin_0 setvariable [“BIS_COIN_onstart”,{player globalchat “Starting CoIn view.}];
Default value: {}
Note: Warning! System starts only after code is finished.
Example: BIS_coin_0 setvariable [“BIS_COIN_onselect”,{globalClass = _this select 0}];
Default value: {}
Example: BIS_coin_0 setvariable [“BIS_COIN_onPurchase”,{sleep 2}]; - building appears after two seconds
Default value: {}
Note: Warning! System continues only after code is finished.
Example: BIS_coin_0 setvariable [“BIS_COIN_onconstruct”,{sleep 2; deleteVehicle (_this select 1);}]; - building appears and is deleted after two seconds
Default value: {}
Example: BIS_coin_0 setvariable [“BIS_COIN_onrepair”,{sleep 2}]; - building is repaired after 2 seconds
Default value: {} (Building is immediately repaired)
Note: Warning! System continues only after code is finished.
Example: BIS_coin_0 setvariable [“BIS_COIN_onsell”,{sleep 2}]; - building is deleted after 2 seconds
Default value: {} (Building is immediately sold)
Note: Warning! System continues only after code is finished.