OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Spooner on 31 May 2009, 12:35:23

Title: The Functions module
Post by: Spooner on 31 May 2009, 12:35:23
One of the key new features of ArmA2 is that a large number of BIS functions are available, covering such things as array operations, mathematical operations and dozens of other useful things. You can browse the documentation for all of these functions in-game using a special dialog box.

* To compile the function library, so you can use any of the functions in your scripts, simply place a GameLogic/Modules/Functions object anywhere in the mission.
Code: (Run this before using any of the functions, to ensure that they have been loaded) [Select]
waituntil {!isnil "bis_fnc_init"};

* To browse the function library, just add a command to init.sqf (or put in the Functions object init) and start the mission:
Code: [Select]
[] call BIS_fnc_help;

Detailed instructions (http://community.bistudio.com/wiki/Functions_Library) @ BIKI
List of BIS functions (http://community.bistudio.com/wiki/Category:ArmA_2:_Functions) @ BIKI
Usefull BIS functions with examples here @ OFPEC (http://www.ofpec.com/COMREF/index.php?action=read&id=231)