This script makes flares shoot further, fall slower and burn longer. If the flare is launched during the day, a smoke shell is created to track the flare path (since the flares do not show during the day).
The script uses my getAlt function which is also new. The getAlt function will provide the sea level altitude of an object, the above ground altitude (both with getPos select 2 and by finding the distance to the ground), the sea level altitude of the terrain at the objects 2D postition and whether the object is over water or not.
I employed the use of the this function because flares and smoke have some strange altitude behaviour. When they are setPos or createVehicle, the z parameter must be referenced to sea level, but when you do a getPos on them the z parrameter is referenced to the above ground level. The getAlt function therefore simplifies the scripting involved with creating and positioning the flares/smoke.