Fandom

武装突袭 Wiki

ConfigClasses

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Introduced with Arma 3 version 1.24
  

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3
版本:
1.24

描述

描述:
Returns an array of config entries which meet criteria in condition code. Command iterates through all available config sub classes of the given config class. Current looked at config is stored in _x variable (similar to alternative count command implementation). Condition has to return true in order for the looked at config to be added to the resulting array.

20px The condition code passed to configClasses should only be used for simple filter expressions and nothing more

基本句法

句法:
condition configClasses config
参数:
condition: String

config: Config
返回值:
Array - Array of Configs

范例

范例1:
collect all CfgVehicles configs: _configs = "true" configClasses (configFile >> "CfgVehicles");

范例2:
Return all classes that can transport 10 and more soldiers: _transporters = "getNumber (_x >> 'transportSoldier') >= 10" configClasses (configFile >> "CfgVehicles");

范例3:
Return all classes that inherit from 'RscText': hint str ("inheritsFrom _x == (configFile >> 'RscText')" configClasses configFile);

额外资讯

多人游戏:
-
也可以看看:

ConfigconfigFilemissionConfigFileconfigPropertiesconfigHierarchy

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Posted on Jul 19, 2014 - 20:08
ffur2007slx2_5
(ArmA3 1.24) It is recommended to use configClasses instead of BIS_fnc_getCfgSubClasses and BIS_fnc_uniqueClasses on subclasses collection or conditional selection. _faces = "true" configClasses (configFile >> "Cfgfaces"); //same as: _faces = (configfile >> "CfgFaces") call BIS_fnc_getCfgSubClasses; //Extract all animals: animals = "((configName _x) isKindOf 'animal')" configClasses (configFile >> "CfgVehicles"); /*same as: aniamls = []; [(configFile >> "CfgVehicles"),{ if ((configName _this) isKindOf “animal”) then {

 animals set [ count animals, _this]
 }

} ] call BIS_fnc_uniqueClasses;*/ Return nested subclasses, currently still BIS_fnc_returnChildren //Return all nested config classes.
[(configFile >> "CfgFaces"),1, true, true ] call BIS_fnc_returnChildren;

Posted on oct 19, 2014 - 12:24
Iceman77
A fantastic way to filter stuff. eg; Create an array of west vehicles and spawn then in front of the player in rows of 5 private ["_cfgArray","_xPos","_yPos","_veh"];

_cfgArray = "(

   (getNumber (_x >> 'scope') >= 2) && 
   {getNumber (_x >> 'side') == 1 && 
   {getText (_x >> 'vehicleClass') in ['Armored', 'Car', 'Air'] 
       } 
   } 

)" configClasses (configFile >> "CfgVehicles");

_xPos = 0; _yPos = 0;

{

   _yPos = _yPos + 20;
   _veh = createVehicle [ ( configName _x ), player modelToWorld [_xPos, _yPos, 0], [], 0, "None"];
   if (_yPos >= 100) then {
       _yPos = 0;
       _xPos = _xPos + 20;
   };

} forEach _cfgArray;


Bottom Section

更多维基

随机维基