Fortify Functions

ace_fortify_fnc_parseSide

Description

Parses the given text and returns a side.

Parameters

Index Description Datatype(s) Default Value
0 Text STRING  

Return Value

Description Datatype(s)
Side SIDE

Example

["blufor"] call ace_fortify_fnc_parseSide;
["west"] call ace_fortify_fnc_parseSide;
["b"] call ace_fortify_fnc_parseSide;

Authors

  • Kingsley

ace_fortify_fnc_updateBudget

Description

Updates the given sides budget.

Parameters

Index Description Datatype(s) Default Value
0 Side SIDE  
1 Change NUMBER 0
2 Display hint BOOL true

Return Value

None

Example

[west, -250, false] call ace_fortify_fnc_updateBudget

Authors

  • Kingsley

ace_fortify_fnc_canFortify

Description

Checks whether the given player can fortify.

Parameters

Index Description Datatype(s) Default Value
0 Player OBJECT  
1 Cost NUMBER 0

Return Value

Description Datatype(s)
Can Fortify BOOL

Example

[player] call ace_fortify_fnc_canFortify

Authors

  • Kingsley

ace_fortify_fnc_registerObjects

Description

Registers the given objects in the given side’s player interaction menu. Players on that side must have the pickaxe item in their inventory to access the menu. Classnames must be in the format [, , <category(optional)>] MUST BE CALLED ON SERVER!

Parameters

Index Description Datatype(s) Default Value
0 Side SIDE  
1 Budget NUMBER  
2 Object Classnames ARRAY  

Return Value

None

Example

[west, 5000, [["Land_BagFence_Long_F", 5], ["Land_BagBunker_Small_F", 50]]] call ace_fortify_fnc_registerObjects
[west, 5000, [["Land_BagFence_Long_F", 5, "tan"], ["Land_BagFence_01_long_green_F", 5, "green"]]] call ace_fortify_fnc_registerObjects

Authors

  • Kingsley

ace_fortify_fnc_getBudget

Description

Gets the budget for the given side.

Parameters

Index Description Datatype(s) Default Value
0 Side SIDE  

Return Value

Description Datatype(s)
Budget NUMBER

Example

[west] call ace_fortify_fnc_getBudget

Authors

  • Kingsley

ace_fortify_fnc_axisLengths

Description

Gets the longest axis of the bounding box of the given object.

Parameters

Index Description Datatype(s) Default Value
0 Object OBJECT  

Return Value

Description Datatype(s)
Lengths ARRAY

Example

[_object] call ace_fortify_fnc_axisLengths;

Authors

  • Kingsley

ace_fortify_fnc_addDeployHandler

Description

Adds a custom deploy handler. Code needs to return BOOL: true (allowed) / false (blocked).

Parameters

Index Description Datatype(s) Default Value
0 Code CODE  

Return Value

None

Example

[{(_this select 0) getVariable ["isBobTheBuilder", false]}] call ace_fortify_fnc_addDeployHandler

Authors

  • Cuel
  • mharis001

ace_fortify_fnc_getCost

Description

Gets the cost for the given side and classname.

Parameters

Index Description Datatype(s) Default Value
0 Side SIDE  
1 Classname STRING  

Return Value

Description Datatype(s)
Cost NUMBER

Example

[west, "Sandbag"] call ace_fortify_fnc_getCost

Authors

  • Kingsley