Fandom

武装突袭 Wiki

Functions Library

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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


Function Library is pack of script functions available from anywhere in game.

Initialization 编辑

Paths 编辑

Editor:

Modules (F7) > Function Library

Data:

ca\modules\functions
ca\modules_e\functions
ca\modules_pmc\functions

Startup 编辑

Place Function manager on map. No additional synchronizing needed.

Usage 编辑

First, you need to check if Functions were already initialized:

waituntil {!isnil "bis_fnc_init"};
 ! Always check for 'BIS_fnc_init', not specific functions (e.g. 'BIS_fnc_setpitchbank')!

Never set value of 'BIS_fnc_init' in any part of mission! It may lead to breakdown of some modules!

After that, you can call any function using following syntax:

_fnc = [params] call TAG_fnc_functionName.

In-game functions viewer 编辑

See BIS_fnc_help

Adding new functions 编辑

List of functions is defined in config - CfgFunctions. New ones can be also added in Description.ext file of mission or campaign.

class cfgFunctions
{
	class BIS
	{
		class category1
		{
			class Test1 		{description="Testing file 1"};
		};
	};
	class CSLA
	{
		class category1
		{
			class Test2 		{description="Testing file 2"; file="test.sqf"};
		};
	};
};

If 'file' path is not set, system will search for file 'functions\category\fn_function.sqf" (if function is defined in description.ext) or 'ca\modules\functions\category\fn_function.sqf" (if function is in config.cpp).

Result is:

  • BIS_fnc_Test1 - will load script \functions\category1\test1.sqf from mission or campaign directory
  • CSLA_fnc_Test2 - will load script test.sqf

List of official functions 编辑

ArmA 2: Functions

更多维基

随机维基