The end result is quite good
But the script is extremely limited as it will work only with a single airfield of a single island: Sara.
Here is what I propose you to do:
1 - Check OFPEC ILS (ofpec_AirportEvents.sqf) to see how to get all the available airfields in an Island reading the config.
2 - For each airfield, get "ilsPosition" and "ilsDirection" class members. islDirection is in format [x,angle,y] so you only need to use x and y to know the runway angle: _rang = (ilsdirection select 0) atan2 (ilsdirection select 2);
3 - Now you have the starting position of the runway and the direction. So it is time to create the lights (use a light array per airfield instead of individual variables per each light. lights[airfield number, light number] = createVehicle [x,y,0].
4 - To calculate the x and y use the ilsposition as origin reference and an increasing radius which will point each time to the center of the runway side-to-side. From this point you need to place a light to the left and a light to the right (_ang + 90) using a general value as half of runway width, and then increase the radius the desired delta and proceed with the next pair of lights.
5 - Repeat 3 and 4 for each airfield.
6 - when all your lights are correctly placed, check how close is the player vehicle to each airfield and activate the light animation for the closer one.
This way you will have a universal airfield lights script for any airfield and any island.
EDIT:
I would go even further to have only a single pair of lights per airfield, One at each side of the runway. As the player aproaches, the pair lights are moved forward (seposed) till certain distance, back to origin and move forward again (following the angle of the runway). To create that animation you really dont need more than a pair of lights. The practical effec for the pilots would be the same and the hit in performance would be minimal.
EDIT2:
Additionaly, this is what I get in arma.RPT file when running these example missions:
"Performance warning: Search for 51f2f718# 471613: runway_edgelight.p3d was very large (520 m)
Performance warning: Search for 51f2f398# 471614: runway_edgelight.p3d was very large (520 m)
"
Many messages like the above ones.