Data/Behaviors/Unit Tracker

## Unit Tracker

### Description

This behavior works like a unit list. It can store all units that are added to it and has validator and max count fields. Anytime a member of the list does not match the set validator, it will be removed from a list.

* There are also flags that allow users to convert the tracker into a global list or player-based list, which does not require a behavior instance to work.
* The tracker system is very useful when trying to keep “one to many” mapping between units.
	+ For example, it can track a summoner unit to its summoned units.
* If the caster unit that possesses the Unit Tracker behavior dies, all its tracked units are no longer tracked by it. They do not remain attached to what is dead.
* A unit can be tracked by multiple units. Tracking a unit does not remove its tracking from another tracker unit.

## Field Categories

### (None) - Max Tracked Units

Maximum amount of units that can be tracked by this behavior

### (None) - Replaced Effect

If the field **Unit Added At Max Rule** has "oldest" value, this is the effect that will occur on the replaced tracked unit (the oldest)

* This can be useful if a caster unit spawns units and wishes the track them, but then, at exceeding the limit, the first one should be killed when a newer one is created.

### (None) - Snap Angle Adjustment

The maximum angle at which the tracked unit can be snapped.

### (None) - Snap Count

Maximum of tracked units that will prevent further tracked units to be snapped. These units were snapped when added to the track list, because they were = or below the limit. This also means that letting this field to 0 will prevent any tracked units from being snapped. Can be influenced by accumulators.

* Snapped seems to be a circumstance in which the unit is teleported when tracked. It Move the unit that has been added to the unit tracker onto a circle in range of the tracker unit. It will only take affect when unit is being start tracked.
* Used by war3 when Blademaster summons the illusions which are placed in a perfect circle including himself.

### (None) - Snap Range

The maximum range at which a tracked unit can be snapped.

### (None) - Snap Rule

* **Snap Rule Closest:** (To be filled)
* **Snap Rule Random:** (To be filled)

### (None) - Tracking Validator Array

Validator (from which target is usually the tracked unit) that removes the "tracked" status of the tracked unit.

* As stated, it is not a disable, but clearly a removal. A unit is no longer tracked once removed, even if he gets back to be valid to the validator's requirement.
* A test has shown that a unit that is not eligible to the validator, yet added to tracked list, will be added shortly for a brief moment, then removed. In other words, this validator array does not fully prevent, but instead, does a periodic validation.

### (None) - Unit Added At Max Rule

What should happen if a unit is added to the tracked list, but the list if full.

* **Ignore:** As it states, the newest unit is ignored.
* **Oldest:** The oldest tracked unit (so far the first in the list) gets replaced.

### (None) - Unit Tracker Flags

* **Shares List Persists Forever:** (To be filled)
* **Snap Placement:** If the unit is snapped, perhaps a placement to allow unit to be on its pathable ground.
* **Snap Unit To Circumference:** Along with the Snap Angle adjustment, this seems to teleport a tracked unit when it is tracked.

* **Use Shared List:** (To be filled)

### (None) - Which Location

(Unsure) Probably where the track list is saved at ?

### Behavior: Requirements

Requirement used by the behavior's owner that either disables or enables the behavior.

* A test has shown that this field indeed enables/disables the behavior, but this does in no case prevent any unit from being tracked by caster. It is unknown what the disabling of this behavior prevents.