I know this is an old thread but I think I have the perfect solution to this problem of getting AI units to fire flares.
Place an OpFor Grenadier on a map and edit his loadout to add flares to his vest, give the grenadier a unitname in the Object Init Variable Name field.
Place the BluFor invisible soldier from CBA as a target for the AI Grenadier unit to point at and give it the name "target" in the Object Init Variable Name field.
Untick the Enable Simulation and Enable Damage boxes in the Object Special States field.
Set the invisible soldier at the height and distance so that the AI Grenadier soldier can point at.
Place a trigger and set the On Activation field with [] execVM "fireFlare.sqf", set the condition to true (just for testing)
Place in the mission folder the following script named fireFlare.sqf :-
unitname setUnitPos "UP";
unitname setCombatMode "BLUE"; // stops the Grenadier from firing bullets at the invisible soldier.
sleep 2;
target enableSimulation true; // the Grenadier can now target the invisible soldier.
unitname doTarget target;
sleep 6;
unitname fire ["GP25Muzzle", "", "CUP_IlumFlareWhite_GP25_M"]; // I used CUP units and CUP flares ... note the second parameter MUST be empty to work.
target enableSimulation false;
unitname disableAI "autoTarget"; // the Grenadier will stop pointing at the invisible soldier.
sleep 4;
unitname setCombatMode "YELLOW"; // the Grenadier is now free to use his weapon and grenades to engage any other enemy units.
unitname setUnitPos "AUTO";