Spawning Flares

Flares—despite living under Arma 3's configFile >> "CfgAmmo" configuration section—can be spawned in using the SQF createVehicle command:

createVehicle ["F_40mm_White", [1200, 2000, 200], [], 0, "none"];

The above snippet works, but unlike a launched flare, the flare will remain stationary in the sky rather than falling. Flares use a simplified simulation (shotIlluminating) that assumes the flare entity has been fired from a weapon.

The trick for getting a falling flare is to set the velocity slightly upwards, and into the direction of the wind:

private _position = getPos player vectorAdd [0, 0, 220];
private _flare = createVehicle ["F_40mm_White", _position, [], 0, "none"];

_flare setVelocity [wind select 0, wind select 1, 30];

Flare Class Names

The full list of flares available in a particular set of Arma 3 addons can be copied to the clipboard with the following snippet:

private _classes =
    "getText (_x >> 'simulation') == 'shotIlluminating'"
    configClasses (configFile >> "CfgAmmo");

private _classesText = _classes
    apply { configName _x }
    joinString toString [13, 10];

copyToClipboard _classesText;

For vanilla Arma 3, the list of flare classes is: