mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ac9ffb5276
Co-authored-by: LinkIsGrim <69561145+LinkIsGrim@users.noreply.github.com>
1.1 KiB
1.1 KiB
layout | title | description | group | order | parent | mod | version | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wiki | Trenches Framework | Explains how to set-up surface whitelisting and entrenching tools. | framework | 5 | wiki | ace |
|
1. Config Values
1.1 Whitelisting surfaces for digging
Single surfaces can be whitelisted by adding ACE_canDig = 1
into CfgSurfaces
.
class CfgSurfaces {
class myAwesomeSurface {
ACE_canDig = 1;
};
};
1.2 Enabling entrenching tool features on an item or backpack
class CfgWeapons { // same config also works on backpacks (CfgVehicles)
class yourBaseClass;
class yourEntrenchingToolClass: yourBaseClass {
ace_trenches_entrenchingTool = 1;
};
};
2. Scripting
2.1 Checking if unit has entrenching tool
ace_trenches_fnc_hasEntrenchingTool
Used to check if unit has any entrenching capable tool.
* Checks if unit has entrenching tool.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Has entrenching tool <BOOL>
*
* Example:
* [bob] call ace_trenches_fnc_hasEntrenchingTool