Hey all,
This script is different from other scripts because instead of creating the effect of flak
even when no one is shooting at the plane, the flak is generated based on how near a projectile is
to the plane. The script is activated by the fired event handler. Once a bullet is fired by the
specified unit, the script will check to see if it is next to a plane or not, and then if it is, delete the projectile in time
and the create one flak effect around the plane in question. The flak effect does do damage and can
easily be modified to not do any, if you know a bit about scripting.
to activate the script, place this in the init field of one of your units. Preferebly pick a unit
that can fire at air targets, such as the vulcan, or the shilka:
this addEventHandler[{fired}, {[_this select 0, _this select 4] exec {flakscript.sqs}}]
From here on, the script will handle everything.
Try it out, I'im sure you'll be suprised as to its capabilities!
The script should have very little lag, i did not experience much lag at all with the given example mission. Just to let you know, my computer specs are much worse than Corbon Dallas's.
PLEASE DON'T TELL ME THAT A SCRIPT LIKE THIS HAS ALREADY BEEN DONE without an addon