- Messages
- 1,468
- Country

What is the initial value of all L:variables when the aircraft is first loaded?
If you answered ZERO you win a Gold Star.
Now, think carefully about your conditions:
(L:sound_played4,bool) 0 ==
(A:SIM ON GROUND, bool) 1 == and
(A:TRAILING EDGE FLAPS0 LEFT PERCENT, percent) 95 >
(A:AIRSPEED INDICATED,knots) 65 < and and
if{ 1 (>L:Sound_60k,number) 1 (>L:sound_played4,bool) and }
- When first loaded, (L:sound_played4,bool) 0 == will be TRUE
- When first loaded, (A:SIM ON GROUND, bool) 1 == will be TRUE
- When first loaded, (A:TRAILING EDGE FLAPS0 LEFT PERCENT, percent) 95 > might be TRUE if this is part of your "cold and dark" saved file.
- When first loaded, (A:AIRSPEED INDICATED,knots) 65 < will be TRUE
Since all of the above conditions are TRUE, obviously the entire statement is also TRUE, so of course the "sound will play!"
The extra "and" marked in red in the "action list" does absolutely nothing. It is simply ignored.
Hi Bill,
In this example 60kts is called after touchdown during the landing run. So from a cold cockpit point of view the full flaps would not be true. It's actually quite difficult to choose unique criteria because of course it's quite possible and normal to set full flaps on the ground. I chose it because it isn't in any of the pre-flight/pre-take-off checks whereas full spoilers "is!"
Taking the ands out of the if{} statements certainly shows that they are superfluous. However, for some reason leaving the other ands as they are means everything works ok and only once. Which for me is ok but as you say if someone is on a World tour! I need to reset the variables on landing.
I decided also to make some logic changes to the whole cabin/flightdeck interaction. Whilst writing this a thought has come up with which you may be able to help.
The checklists require that:-
1. I press the cabin call button twice as an instruction to the cabin crew to start the safety briefing and also to prepare the a/c for landing.
2. I press the cabin call button thrice to alert the cabin crew to take their seats for take-off.
My question is; "Can I get the ding to repeat two or three times by the just continuing to press the button until two or three dings are heard?"
The current code is
Code:
<Click Kind="LeftSingle+LeftRelease">
(M:Event) 'LeftSingle' scmp 0 == if{ (L:CABIN CALL,number) ! (>L:CABIN CALL,number)
(L:CABIN CALL,number) 1 ==
1 (>L:Sound_attend2a,enum)
if{ (P:local time, seconds) 1.15 + (>L:CAB LIGHT 2,number) } }
(M:Event) 'LeftRelease' scmp 0 == if{ (L:CABIN CALL,number) ! (>L:CABIN CALL,number)
(L:CABIN CALL,number) 1 ==
0 (>L:Sound_attend2a,enum)
if{ (P:local time, seconds) 1.15 + (>L:CAB LIGHT 2,number) } }
</Click>
the ding sound is (L:Sound_attend2a,enum) which is a single ding. as you can see there is also (L:CAB LIGHT 2,number) which I'm trying to get to stay on for as long as I press the button. However, the (L:CAB LIGHT 2,number) which is the "Steward's Light" on the OH is also controlled by the incoming cabin messages. It stays lit for each entire message to simulate the real event.
vololiberista

