- Messages
- 231
- Country

I am designing in Gmax for fs2004. In the image below highlighted in yellow is a pic of the section light controls from the F4u-1 Corsair's pilot's manual.
The 3 way master switch (switch_light_section_on) in the forward position should turn on the section light in a steady on display, either bright or dim depending on the position of the 2 way diming switch next to it.
The 3 way,s middle position should be the off display of the section light.
The 3 way master switch in the rear position should turn on the section light in a flashing display, either bright or dim depending on the position of the 2 way diming switch next to it.
My plan was to use the forward position to turn on a display in range part(sec_lght_on_b_d_vis) to show a version of the bright /dim switch controling the steady on light displays.
The middle position for a display in range part(sec_lght_b_d_nonvis) to show a version of the bright /dim switch that is unpowered and controls nothing except it's own animation.
And the rear position to turn on a display in range part(sec_lght_flsh_b_d_vis) to show a version of the bright /dim switch controling the flashing light displays.
That was my plan anyway! After a week of rewrites of all of the codes I am convinced I do not understand how the 3 way code works or how to connect the display in range parts to it. Can any one tell me what I am doing wrong? Here are the current codes:
The above code displays the, sec_lght_flsh_b_d_vis, in both forward and back positions, it is hidden in the middle position. The sec_lght_on_b_d_vis and sec_lght_b_d_nonvis all the time. Here are the current display in range part codes:
Any comments or explanations of what the code is doing as written will be a help even if you have no fix for the over all problem. As you can tell by the pic I have several more places I need to use the 3 way code. The running lights highlighted in red may be a particular problem.
Carl
The 3 way master switch (switch_light_section_on) in the forward position should turn on the section light in a steady on display, either bright or dim depending on the position of the 2 way diming switch next to it.
The 3 way,s middle position should be the off display of the section light.
The 3 way master switch in the rear position should turn on the section light in a flashing display, either bright or dim depending on the position of the 2 way diming switch next to it.
My plan was to use the forward position to turn on a display in range part(sec_lght_on_b_d_vis) to show a version of the bright /dim switch controling the steady on light displays.
The middle position for a display in range part(sec_lght_b_d_nonvis) to show a version of the bright /dim switch that is unpowered and controls nothing except it's own animation.
And the rear position to turn on a display in range part(sec_lght_flsh_b_d_vis) to show a version of the bright /dim switch controling the flashing light displays.
That was my plan anyway! After a week of rewrites of all of the codes I am convinced I do not understand how the 3 way code works or how to connect the display in range parts to it. Can any one tell me what I am doing wrong? Here are the current codes:
Code:
<part>
<name>switch_light_section_on</name>
<animation>
<parameter>
<code>
25 (L:switch_light_section_on, number) 25 * +
</code>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>Section Light</tooltip_text>
<mouse_flags>LeftSingle+RightSingle</mouse_flags>
<callback_code>
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:switch_light_section_on, enum) -- -1 max (>L:switch_light_section_on, enum) }
(L:sec_lght_on_b_d_vis, bool) ! (>L:sec_lght_on_b_d_vis, bool)
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:switch_light_section_on, enum) ++ 1 min (>L:switch_light_section_on, enum) }
(L:sec_lght_flsh_b_d_vis, bool) ! (>L:sec_lght_flsh_b_d_vis, bool)
</callback_code>
</mouserect>
</part>
The above code displays the, sec_lght_flsh_b_d_vis, in both forward and back positions, it is hidden in the middle position. The sec_lght_on_b_d_vis and sec_lght_b_d_nonvis all the time. Here are the current display in range part codes:
Code:
<part>
<name>sec_lght_on_b_d_vis</name>
<visible_in_range>
<parameter>
<code>
(L:sec_lght_on_b_d_vis,bool) 100 *
</code>
</parameter>
<minvalue>-1</minvalue>
</visible_in_range>
</part>
<part>
<name>sec_lght_flsh_b_d_vis</name>
<visible_in_range>
<parameter>
<code>
(L:sec_lght_flsh_b_d_vis,bool) 100 *
</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>sec_lght_b_d_nonvis</name>
<visible_in_range>
<parameter>
<code>
(L:sec_lght_b_d_nonvis,bool) 100 *
</code>
</parameter>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
Any comments or explanations of what the code is doing as written will be a help even if you have no fix for the over all problem. As you can tell by the pic I have several more places I need to use the 3 way code. The running lights highlighted in red may be a particular problem.
Carl


