Framework functions - Global-Conflicts-ArmA/Olsen-Framework-Arma-3 GitHub Wiki
This page will document all public functions available in framework. Note that additionally a short description of every function can be found at the top of it's respective file.
FW_fnc_AreaCount
Description:
Counts units on set side in area of set diameter around object.
Parameters:
- side [side]
- radius [number]
- center of area [object]
- Ignore Untracked units [bool] (def: false)
Returns:
amount of units in area [number]
Example:
[WEST, 100, base] call FW_fnc_AreaCount
Result:
units in set area are counted
Returned: 10
FW_fnc_EndMission
Description:
Ends mission in orderly fashion and displays end screen.
Parameters:
- text to display in end screen [string]
Returns:
nothing
Example:
"USMC Victory" call FW_fnc_EndMission
Result:
mission is ended and above message is displayed on end screen
Returned: nothing
FW_fnc_CasualtyPercentage
Description:
Returns casualty percentage for set team
Parameters:
- team [string]
Returns:
casualty percentage (1-100) [number]
Example:
"USMC" call FW_fnc_CasualtyPercentage
Result:
casualty percentage for USMC is returned
Returned: 70 [number]
FW_fnc_CasualtyCount
Description:
Counts number of casualties on set team
Parameters:
- team [string]
Returns:
casualty count [number]
Example:
"USMC" call FW_fnc_CasualtyCount
Result:
number of casualties for USMC is returned
Returned: 10 [number]
FW_fnc_IsAlive
Description:
Checks if unit is considered alive by framework
Parameters:
- unit [object]
Returns:
unit's state [bool]
Example:
player call FW_fnc_IsAlive
Result:
player's state is returned
Returned: true [bool]
FW_fnc_AddTeam
Description:
Adds team
Parameters:
- side of new team [side]
- name of new team [string]
- type of new team: "ai"/"player" [string]
Returns:
nothing
Example:
[WEST, "NATO", "player"] call FW_fnc_AddTeam
Result:
new team is created
Returned: nothing
FW_fnc_DebugMessage
Description:
Display on-screen debug message.
Parameters:
- message [string]
Returns:
nothing
Example:
"Hello World" call FW_fnc_DebugMessage
Result:
debug message displayed
Returned: nothing
FW_fnc_TrackAsset
Description:
Sets asset to be tracked by framework
Parameters:
- asset [object]
- name of asset [string]
- team of asset [string]
Returns:
nothing
Example:
[tank, "T90", "VDV"] call FW_fnc_TrackAsset
Result:
Asset is tracked
Returned: nothing
FW_fnc_ACRES_SetRadio
Description:
Set radio channel for a unit.
Parameters:
- unit [object]
- radio class [string]
- radio channel [int]
Returns:
nothing
Example:
[this, "ACRE_PRC343", 2] call FW_fnc_ACRES_SetRadio;
Result:
player's radio channel set
Returned: nothing
FW_fnc_RemoveAllGear
Description:
Removes all gear from unit.
Parameters:
- unit [object]
Returns:
nothing
Example:
player call FW_fnc_RemoveAllGear
Result:
player's gear removed
Returned: nothing
FW_fnc_RemoveAllVehicleGear
Description:
Clear cargo of a vehicle.
Parameters:
- vehicle [object]
Returns:
nothing
Example:
tank call FW_fnc_RemoveAllVehicleGear
Result:
tank's cargo cleared
Returned: nothing
FW_fnc_GearScript
Description:
Run gearscript on set unit.
Parameters:
- unit to run gearscript for [object]
- loadout name [string]
- group name [string] (OPTIONAL)
Returns:
nothing
Example:
[this, "SL", "1'1"] call FW_fnc_GearScript
Result:
Add SL loadout to unit, set it's group name to 1'1.
Returned: nothing
FW_fnc_VehGearScript
Description:
Add set loadout to vehicle.
Parameters:
- vehicle [object]
- loadout type [string]
Returns:
nothing
Example:
[this, "HUMMVEE"] call FW_fnc_VehicleGearScript
Result:
Vehicle receives HUMVEE loadout.
Returned: nothing
FW_fnc_AddItem
Description:
Add item to local unit. Can specify container and amount.
Parameters:
- classname of item [string]
- amount of item to add [number] (OPTIONAL)
- container name "uniform"/"vest"/"backpack" available [string] (OPTIONAL)
Returns:
nothing
Example:
["ItemMap", 1, "uniform"] call FW_fnc_AddItem;
Result:
Map added to uniform.
Returned: nothing
FW_fnc_AddItemRandom
Description:
Add item random to local unit. Can specify container and amount.
For more info, visit https://github.com/dklollol/Olsen-Framework-Arma-3/wiki/gear.sqf
Parameters:
n/a
Returns:
nothing
Example:
n/a
Result:
n/a
FW_fnc_AddItemVehicle
Description:
Add item to vehicle's cargo.
Parameters:
- classname of item [string]
- amount [number] (OPTIONAL)
Returns:
nothing
Example:
["30Rnd_556x45_Stanag", 8] call FW_fnc_AddItemVehicle
Result:
8 STANAGS added to vehicle inventory.
FW_fnc_AddItemVehicleRandom
Description:
Add random item to vehicle's cargo.
Parameters:
n/a
Returns:
nothing
Example:
n/a
Result:
n/a