Task Framework Basics

From Arma Projects
Jump to: navigation, search

The configuration of tasks in the framework is stored under CfgMissionTasks. This is a configuration in the description.ext that sets up the objectives and tasks for a mission. It also supports the spawning of AI units, vehicles and objects that will contribute to the experience of players have with the mission.

Start Creating a Task

To start making a task, simply create a new class in the description.ext file (or #include an external file) and this class is called CfgMissionTasks. Every task is a sub-class of this and is handled based on its configuration.

class CfgMissionTasks {
	class My_Parent_1 {}; // A task
	class My_Task_1 {}; // Another Task

Task Scope

Each task has many options available that are all outlined below. To start, every task has a scope. This scope tells the framework what it can and cannot do with the task.
scope = <number:0-2>

The options of the scope are as follows:

Scope ID Description
0 Prevent task from being created
1 Enable creation of the task when called
2 Enable creation of the task at mission start

Task TypeID

The task type ID is different compared to the task type configured in the description. The type ID is a way of grouping task types together that allow the framework to filter what it can create on certain triggers. For instance, if a task type of only patrol tasks was to be created, it will search tasks with the Patrol ID and return their classNames to the task master to be selected and created

Configured Task Type IDs are: (IN DEV)

Task Type ID Description
0 Unknown
1 Random Encounters - General
2 Patrol Operations

Example Configuration

class My_Parent_1 {
	scope = 2;
	typeID = 2;