User Tools

Site Tools


arma2:editor_modules:coin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arma2:editor_modules:coin [2009/05/31 16:55] – created coin initial page. snakemanarma2:editor_modules:coin [2024/08/01 20:57] (current) – links added. snakeman
Line 1: Line 1:
-====== Construction Interface ======+====== ArmA 2 Construction Interface ====== 
 + 
 +[[https://www.pmctactical.org/forum/viewforum.php?f=50|ArmA 2 Forum]], [[:arma2|ArmA 2 Home]], [[arma2:config|ArmA 2 Config]], [[arma2:file_formats|ArmA 2 File Formats]], [[arma2:missions|ArmA 2 Missions]], [[arma2:modeling|ArmA 2 3D Modeling]], [[arma2:scripting|ArmA 2 Scripting]], [[arma2:terrain|ArmA 2 Terrain]], [[arma2:texturing|ArmA 2 Texturing]], [[arma2:tools|ArmA 2 Tools]]
  
 Construction Interface (CoIn) is universal system for base construction primarily made for Warfare 2. Construction Interface (CoIn) is universal system for base construction primarily made for Warfare 2.
Line 19: Line 21:
 Set variables to BIS_coin_# with desired values Set variables to BIS_coin_# with desired values
  
-  * name = <string>; - Name of construction (displayed in action menu and GUI) +  * BIS_COIN_name = <string>; - Name of construction (displayed in action menu and GUI) 
  
-Example: BIS_coin_0 setvariable ["name","Base"];\\+Example: BIS_coin_0 setvariable ["BIS_COIN_name","Base"];\\
 Default value: "" (no name)  Default value: "" (no name) 
  
-  * 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_rules = <array> or <side>; - Rules which defines which units have access to construction. Can be either list of specific units or whole side. 
  
-Example: BIS_coin_0 setvariable ["rules",[west,guer_commander]];\\ +Example: BIS_coin_0 setvariable ["BIS_COIN_rules",[west,guer_commander]];\\ 
-Default value: [] +Default value: []
  
-  * categories = <array>; - List of categories +  * BIS_COIN_categories = <array>; - List of categories 
  
-Example: BIS_coin_0 setvariable ["categories",["Base","Defence"]];\\+Example: BIS_coin_0 setvariable ["BIS_COIN_categories",["Base","Defence"]];\\
 Default value: []  Default value: [] 
  
-  * items = <array>; - List of items to buy. Preview class (green transparent building) have to be named buildingclass_preview.+  * BIS_COIN_items = <array>; - List of items to buy. Preview class (green transparent building) have to be named buildingclass_preview.
  
 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 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
Line 40: Line 42:
 Example:  Example: 
 <code cpp> <code cpp>
-bis_coin_0 setvariable ["items",+bis_coin_0 setvariable ["BIS_COIN_items",
  [  [
  //--- Class, Category, Cost or [fundsID,Cost], (display name)  //--- Class, Category, Cost or [fundsID,Cost], (display name)
Line 51: Line 53:
 Default value: []  Default value: [] 
  
-  * funds = <string> or <array>; - Variable(s) which stores amount of funds. +  * BIS_COIN_funds = <string> or <array>; - Variable(s) which stores amount of funds. 
  
-Example 1: BIS_coin_0 setvariable ["funds","money_account"];\\ +Example 1: BIS_coin_0 setvariable ["BIS_COIN_funds","money_account"];\\ 
-Example 2: BIS_coin_0 setvariable ["funds",["supply_account","money_account"]];\\+Example 2: BIS_coin_0 setvariable ["BIS_COIN_funds",["supply_account","money_account"]];\\
 Default value: 0  Default value: 0 
  
-  * fundsDescription = <string> or <array>; - Variable(s) which stores description of funds types. +  * BIS_COIN_fundsDescription = <string> or <array>; - Variable(s) which stores description of funds types. 
  
-Example 1: BIS_coin_0 setvariable ["fundsDescription","CZK"];\\ +Example 1: BIS_coin_0 setvariable ["BIS_COIN_fundsDescription","CZK"];\\ 
-Example 2: BIS_coin_0 setvariable ["fundsDescription",["€","$"]];\\+Example 2: BIS_coin_0 setvariable ["BIS_COIN_fundsDescription",["€","$"]];\\
 Default value: "$"  Default value: "$" 
  
-  * 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] +  * 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 ["areasize",[50,20]];\\ +Example: BIS_coin_0 setvariable ["BIS_COIN_areasize",[50,20]];\\ 
-Default value: [150,50]+Default value: [150,50] 
  
-  * actionCondition = <string>; - String - condition for showing CoIn "Construction" action. If false, action never apperars. Can be changed on fly. Passed arguments: _this, _target. +  * 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
  
-Example: BIS_coin_0 setvariable ["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.  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. 
  
-  * 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_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]  
 + 
 +Example: BIS_coin_0 setvariable ["BIS_COIN_onstart",{player globalchat "Starting CoIn view.}];\\ 
 +Default value: {} 
  
-Example: BIS_coin_0 setvariable ["onstart",{player globalchat "Starting CoIn view.}];\\ 
-Default value: {} 
 Note: Warning! System starts only after code is finished.  Note: Warning! System starts only after code is finished. 
  
-  * onSelect [code]; - Code which is executed when some building type is selected from menu. Passed arguments are [logic, class, preview building] +  * BIS_COIN_onSelect <code>; - Code which is executed when some building type is selected from menu. Passed arguments are [logic, class, preview building] 
  
-Example: BIS_coin_0 setvariable ["onselect",{globalClass = _this select 0}];\\+Example: BIS_coin_0 setvariable ["BIS_COIN_onselect",{globalClass = _this select 0}];\\
 Default value: {}  Default value: {} 
  
-  * 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_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].  
 + 
 +Example: BIS_coin_0 setvariable ["BIS_COIN_onPurchase",{sleep 2}]; - building appears after two seconds\\ 
 +Default value: {} 
  
-Example: BIS_coin_0 setvariable ["onPurchase",{sleep 2}]; - building appears after two seconds\\ 
-Default value: {}\\ 
 Note: Warning! System continues only after code is finished.  Note: Warning! System continues only after code is finished. 
  
-  * 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_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]. 
  
-Example: BIS_coin_0 setvariable ["onconstruct",{sleep 2; deleteVehicle (_this select 1);}]; - building appears and is deleted after two seconds\\+Example: BIS_coin_0 setvariable ["BIS_COIN_onconstruct",{sleep 2; deleteVehicle (_this select 1);}]; - building appears and is deleted after two seconds\\
 Default value: {}  Default value: {} 
  
-  * 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_onRepair <code>; - Code which is executed when some building is repaired. Once code is completed, building is repaired. Passed arguments are [logic, object].  
 + 
 +Example: BIS_coin_0 setvariable ["BIS_COIN_onrepair",{sleep 2}]; - building is repaired after 2 seconds\\ 
 +Default value: {} (Building is immediately repaired) 
  
-Example: BIS_coin_0 setvariable ["onrepair",{sleep 2}]; - building is repaired after 2 seconds\\ 
-Default value: {} (Building is immediately repaired)\\ 
 Note: Warning! System continues only after code is finished.  Note: Warning! System continues only after code is finished. 
  
-  * onSell [code]; - Code which is executed when some building is sold. Once code is completed, building is deleted. Passed argument is [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]  
 + 
 +Example: BIS_coin_0 setvariable ["BIS_COIN_onsell",{sleep 2}]; - building is deleted after 2 seconds\\ 
 +Default value: {} (Building is immediately sold) 
  
-Example: BIS_coin_0 setvariable ["onsell",{sleep 2}]; - building is deleted after 2 seconds\\ 
-Default value: {} (Building is immediately sold)\\ 
 Note: Warning! System continues only after code is finished. Note: Warning! System continues only after code is finished.
  
arma2/editor_modules/coin.1243788932.txt.gz · Last modified: 2009/05/31 16:55 by snakeman