;LAST UPDATE 2006/02/20 YAG
;Based script : GACHOPIN

_plane = _this select 0
#start
@((_plane animationphase "al" == 0) && (isEngineOn _plane) || !(alive _plane))
?!(alive _plane): exit
?(not(daytime <=7 ||daytime >=16)): exit
~3
_light = "LLight" createvehicle [0,0,0]
_light inflame true
_plane setobjecttexture[10,"\JASDF_F15\LL.paa"];
?_plane animationphase "al" == 1:_plane setobjecttexture[10,"\JASDF_F15\LLD.paa"];goto "end"
#loop
?(not alive _plane):deletevehicle _light;_plane setobjecttexture[10,""];exit;
?(not isEngineOn _plane):_plane setobjecttexture[10,"\JASDF_F15\LLD.paa"];goto "end"
~0.01
_velo = (velocity _plane)
_posx = getpos _plane select 0
_posy = getpos _plane select 1
_light setpos [_posx +350*(sin getdir _plane),_posy +350*(cos getdir _plane),(getpos _plane select 2)-60]
_light setvelocity _velo
?_plane animationphase "al" == 1:_plane setobjecttexture[10,"\JASDF_F15\LLD.paa"];goto "end"
goto "loop"
#loop20
?(not alive _plane):deletevehicle _light;_plane setobjecttexture[10,""];exit;
?(not isEngineOn _plane):_plane setobjecttexture[10,"\JASDF_F15\LLD.paa"];goto "end"
~0.01
_velo = (velocity _plane)
_posx = getpos _plane select 0
_posy = getpos _plane select 1
?(getpos _plane select 2 > 21):goto "loop"
_light setpos [_posx +190*(sin getdir _plane),_posy +190*(cos getdir _plane),(getpos _plane select 2)-60]
_light setvelocity _velo
?_plane animationphase "al" == 1:_plane setobjecttexture[10,"\JASDF_F15\LLD.paa"];goto "end"
goto "loop20"
#end
deletevehicle _light;
~0.01
_plane setobjecttexture[10,"\JASDF_F15\LLD0.paa"]
~0.05
_plane setobjecttexture[10,"\JASDF_F15\LLD1.paa"]
~0.025
_plane setobjecttexture[10,""]
goto "start"
exit