Task Framework Position
Every task should have a position and this part of the task configuration allows a mission maker to specify either a specific location or create a dynamic position that can change every time the task is created.
Contents
Types of Positions
Every position has two types of position, the position and the offset.
- Position - The main location for the task and can be used as a reference point in other parts of the configuration
- PositionOffset - An alternative position that can be used as a reference point to hide the real location of a task and its objective
If the offset is not declared, it will default to the known position
When specifying any position in other parts of the task config, "position" and "positionOffset" can be used to get the task location.
Setting a static position
The position and offset can be set statically and reference either an [x,y,z] co-ordinates on a map or use a map marker name as a reference point.
- Example
// Array location
class My_Task_1 {
position[] = {252,131,0};
positionOffset[] = {612,513,0};
};
// Marker Names
class My_Task_1 {
position = "op_p1_baracks";
positionOffset = "op_p1_barracks_offset";
};
Creating a dynamic position
If a mission maker is looking to make a task more dynamic, they can use either a random selection ability or the CfgMapData to determine a dynamic location or area on the map using search parameters.
Selecting a random position
- Random Defined Areas using coordinates or markers
class My_Task_1 {
position[] = {"Marker_0","Marker_1"};
positionOffset[] = { {500,135,0},"Marker_1"}; // One of the two will be returned
};
Dynamic Area Searching
Using the map's data in the framework, a mission maker can locate areas for tasks very simply. The maps data is a recorded snap shot of an island to speed up the process for determining possible areas that are appropriate for tasks that are unlikely to conflict with objects, terrain level etc...
There are a few parameters to consider as well as using "position" to determine a reference point to search around.
- Search Area Types
- Area types are found from CfgMapData which was scanned from the Developer Framework. These are used to provide a list of available areas that the task is valid for. For instance, "Town Clearance" should search for towns and not military bases.
-
positionSearchTypes = <array:areaTypes>
- Search Radius
- The maximum distance to retrieve an area that matches the search types
-
positionSearchRadius = <number:radius>
- Near Roads
- For tasks that require a certain area type but want the position to return a position that is on a road. For instance an IED blast site or convoy ambush.
-
positionNearRoad = <number:boolean>
This will return two parts of the position data
position = center of map sector the area is in, visualised on the map often by 1km by 1km grids. positionOffset = the location of the returned area.
An example of the area search capability.
// Using the Preconfigured Map Data to search for location areas.
class My_Task_1 {
positionSearchTypes[] = {"Town","Village"};
positionSearchRadius = 1000;
positionNearRoad = 1;
};