Fandom

武装突袭 Wiki

BIS_fnc_conditionalSelect

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

  

Click on the images for descriptions

Introduced in

Game:
Arma 2
Version:
1.00

Description

Description:

/************************************************************
	Conditional Select

Parameters: [array, {condition}]

This returns a sub-array of elements that satisfy a specific condition.
The originally passed array is NOT modified!

The function takes, in order, every element of the passed array,
evaluates it in the condition, and, if the condition is true, adds
it to the return array.

In the condition, the currently tested element is assigned to
the variable "_x".

Care must be taken that the condition won't cause errors. For
example, if your condition assumes all elements are numbers,
errors will occur if your array includes strings.

This function is similar to the "count" command, only it returns
the elements of the array that satisfy the condition, rather
than simply returning the count.

Example: [[10,0,8,2,6,4], {_x > 5}] call BIS_fnc_conditionalSelect
Returns: [10,8,6]

Example: [[10,true,8,player], {typename _x == "STRING"}] call BIS_fnc_conditionalSelect
Returns: []

************************************************************/

(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)

Example 1:</dt>
Example needed</dd>
See also:</dt>

See also needed</dd>

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section

更多维基

随机维基