Fandom

武装突袭 Wiki

And

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

Introduced with Operation Flashpoint version 1.00
  

点击图片可看到更多讯息

开始使用于

游戏:
Operation Flashpoint
版本:
1.00

描述

描述:
Returns true only if both conditions are true. In case of the alternative syntax, lazy evaluation is used (if left operand is false, evaluation of the right side is skipped completely).

基本句法

句法:
Boolean = a and b
参数:
a: Boolean - Test condition or variable that returns Boolean.

b: Boolean - Test condition or variable that returns Boolean.
返回值:
Boolean

替代句法

句法:
Boolean = a and b (Only available since ArmA 2:OA v1.62.)
参数:
a: Boolean - Test condition or variable that returns Boolean.

b: Code - Code that returns Boolean. It is not evaluated if a returns as false.
返回值:
Boolean

范例

范例1:
if ((alive player) and (_enemycount == 0)) then {hint "you win !"}

范例2:
if ((count _array > 0) and {(_array select 0) == player}) then {hint "It works! Without lazy evaluation it would throw an error if array was empty."}

额外资讯

多人游戏:
no special considerations
也可以看看:

a && borOperators

注意事项

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

Notes

Bottom Section

Posted on April 12, 2015 - 10:45 (UTC)
IT07
Just like the "or" command, the "and" command allows several conditions to be checked. Example:
if(alive player and speed player > 0 and _someOtherVar) then { hint"All three condtions are true" }; The example above will check if the player is alive and if the player is moving and checks if _someOtherVar is true.

更多维基

随机维基