2008-10-11 23:17:23 +00:00
|
|
|
sbc1 = aircraft.light.new( "/sim/model/lights/sbc1", [0.5, 0.3] );
|
|
|
|
sbc1.interval = 0.1;
|
|
|
|
sbc1.switch( 1 );
|
|
|
|
|
|
|
|
sbc2 = aircraft.light.new( "/sim/model/lights/sbc2", [0.2, 0.3], "/sim/model/lights/sbc1/state" );
|
|
|
|
sbc2.interval = 0;
|
|
|
|
sbc2.switch( 1 );
|
|
|
|
|
2008-10-12 20:35:38 +00:00
|
|
|
setlistener( "/sim/model/lights/sbc2/state", func(n) {
|
2008-10-11 23:17:23 +00:00
|
|
|
bsbc1 = sbc1.stateN.getValue();
|
2008-10-12 20:35:38 +00:00
|
|
|
bsbc2 = n.getBoolValue();
|
2008-10-11 23:17:23 +00:00
|
|
|
b = 0;
|
|
|
|
if( bsbc1 and bsbc2 and getprop( "/controls/lighting/beacon") ) {
|
|
|
|
b = 1;
|
|
|
|
} else {
|
|
|
|
b = 0;
|
|
|
|
}
|
|
|
|
setprop( "/sim/model/lights/beacon/enabled", b );
|
|
|
|
|
|
|
|
if( bsbc1 and !bsbc2 and getprop( "/controls/lighting/strobe" ) ) {
|
|
|
|
b = 1;
|
|
|
|
} else {
|
|
|
|
b = 0;
|
|
|
|
}
|
|
|
|
setprop( "/sim/model/lights/strobe/enabled", b );
|
|
|
|
});
|
|
|
|
|
|
|
|
beacon = aircraft.light.new( "/sim/model/lights/beacon", [0.05, 0.05] );
|
|
|
|
beacon.interval = 0;
|
|
|
|
|
|
|
|
strobe = aircraft.light.new( "/sim/model/lights/strobe", [0.05, 0.05] );
|
|
|
|
strobe.interval = 0;
|
|
|
|
|
|
|
|
setprop( "/instrumentation/nav[0]/ident", 0 );
|
|
|
|
setprop( "/instrumentation/nav[1]/ident", 0 );
|
|
|
|
|