-
Notifications
You must be signed in to change notification settings - Fork 1
Functions Library
This page has direct links to all functions currently available in the library for immediate use with headers and usage examples. This has replaced functions being in the template although new custom ones can be added to a specific mission. The only exception from the library is briefing
.
Functions INSIDE a mission file are still accessed via FUNC(myFunction)
or TAC_Scripts_fnc_myFunction
Anything from the functions library are accessed via MFUNC(reinforcements)
or TAC_Mission_fnc_reinforcements
Variable Macros are also:
Mission Template:
-
GVAR(myVar)
>TAC_Scripts_MyVar
-
QGVAR(myVar)
>"TAC_Scripts_MyVar"
Functions Library:
-
MGVAR(myVar)
>TAC_Mission_myVar
-
QMGVAR(myVar)
>"TAC_Mission_myVar"
List of variables available for use.
GVAR(timeUntilStart)
Will be available after initServer
has run and will determine the seconds remaining until 14:00 Zulu. If testing a mission do not use the variable until you're satisfied with results.
(Note: This does not get updated, if you use it later in the mission, you must take into account the time since start as well.)
Example:
[{
// Code to run 1 hour after mission start
}, [], GVAR(timeUntilStart) + 3600] call CBA_fnc_waitAndExecute;
Full list is available on the sidebar.
This section describes how to make changes to the existing library scripts or create your own specific to your mission. General scripts useful to more missions should be added to the Functions Library at least eventually, while scripts specific to the mission should live in the mission itself.
- Copy the desired script file to your mission's
functions
folder. - Add the script to
CfgFunctions.hpp
. - Follow the instructions found inside the specific script for how to use it (eg. where to call it from).
- Copy
fnc_teleport.sqf
tomy_mission.Map/functions/fnc_teleport.sqf
. - Add
DFUNC(teleport)
toCfgFunctions.hpp
. - Following the instructions in the script, add
[tpObj, tpPos, "Teleport"] call FUNC(teleport);
toinitPlayerLocal.sqf
.
Development defines are available in script_component.hpp
which you can uncomment:
-
DEBUG_MODE_FULL
to enable debug mode for all functions in the template. -
RECOMPILE
to recompile the functions in-game without reloading (or even restarting) the mission.
Pages
- Home
- Your First Mission
- Creating A Mission
- Contract Missions
- Difficulty Guidelines
-
Functions Library
- Base Spectator
- Bomber
- Car Alarm
- Chemical Detector
- Collect Intel
- Connect Battery To Defusable
- Contamination Gas
- Count Alive
- Dialogue
- Disable AI
- Download Intel
- Earthquake
- Enable AI
- Force Shooting
- Ground Fog
- Hunt
- Lock Doors
- Mark Buildings
- Monitor Units
- Mortar Strike
- Ping
- Players
- Reaction
- Reinforcements
- Reinforcement Waves
- Respirator Effects
- Set Sleeping
- Sound Source
- Surrender
- Switch Action
- Teleport
- Toggle Lights
- Trigger Area
- Helicopters
- Resources
- Quality Checklist
- Useful Commands
- ArmaQDL