Group TracKer (GTK)

Author(s) and Acknoledgement(s):

Requirements:

Description:

The group tracker (GTK) module tracks the positions of all groups, and depending on their range from the player, calls a function specified in the config.hpp file. This can be useful for monitoring groups proximity to the player.
The module works by creating location logics for each group specified, and then (ideally) syncing those logics to the groups position each cycle, through the sync function.
As the player enters within a specified distance of the location logic, it activates the group by calling the active function; and vice versa when the player leaves the distance (inactive function).

How-to-use:

The GTK config file is the important file to control how the group tracker module is used. Shown below is a commented description of what you would expect to find in the config.hpp file.

	case (YOUR_CASE_NUMBER) : { // SYSTEM_NAME
		[
			{FNC_SYNC},
			{FNC_ACTIVE},
			{FNC_INACTIVE}
		]
	};

All functions are only parsed the Location Logic for the particular group.
	
Make sure to place the following line in the description.ext:

	#include "modules\osom\functions.hpp"

Now to use the GTK in the editor, place a Game logic or other object, synchronise the required groups to be tracked, and paste the following code (or similar):
		
	this setvariable ["range", 50]; this setvariable ["type",0]; this setvariable ["sleep", 10]; 0 = this execvm "modules\GTK\tracker.sqf"
		
This will set the tracking range from the player to 50m, with the config case number of 0, and a cycle rate of 10s.
This could also be done through:

	0 = [[group1, group2], 50, 0, 10] execvm "modules\GTK\tracker.sqf"