Milton_Shupe
Resource contributor
- Messages
- 331
- Country

I know how to display text and strings, but I have not yet learned how to display strings conditionally.
I have a Sail Management Gauge. One element is to display the Sail Configuration based on a variable.
The display is made up of two parts- a fixed text and a variable conditionally displayed string. (See image at bottom)
For example: Sail Config: Running
The code below shows the fixed text, a range statement, and a variable string that needs to change based on range values.
I need to understand how to connect range value statements to conditionally display the necessary strings.
Here's the scoop:
-------- This table below lists the ranges and the associated string values to be displayed.
Based on Sail Arm positions (flap settings covering ranges of degrees of movement shown), display the following text on the gauge.
a. 0- 60 degrees, Display Close Hauled
b. 61-120 degrees, Display Beam Reach
c. 121-150 degrees, Display Broad Reach
d. 151-210 degrees, Display Running
e. 211-240 degrees, Display Broad Reach
f. 241-300 degrees, Display Beam reach
g. 301-359 degrees, Display Close Hauled
I love the FS2X.com site but it does not spend a lot of time explaining conditional statements.
I would appreciate any guidance. Thanks in advance.
I have a Sail Management Gauge. One element is to display the Sail Configuration based on a variable.
The display is made up of two parts- a fixed text and a variable conditionally displayed string. (See image at bottom)
For example: Sail Config: Running
The code below shows the fixed text, a range statement, and a variable string that needs to change based on range values.
I need to understand how to connect range value statements to conditionally display the necessary strings.
Code:
<!-- Sail Configuration -->
<!-- Fixed Text -->
<Element>
<Position X="320" Y="247"/>
<Text X="100" Y="25" Length="15" Font="Arial" Color="#00FFFF" >
<String>Sail Config:</String>
</Text>
</Element>
<!-- Conditional Variable Text Displayed based on range values -->
<Value> 151 210 (A:Trailing edge flaps0 left angle, degrees) rng </Value>
<Element>
<Position X="400" Y="277"/>
<Text X="100" Y="25" Length="15" Font="Arial" Color="#00FFFF" >
<String>Running</String>
</Text>
</Element>
Here's the scoop:
-------- This table below lists the ranges and the associated string values to be displayed.
Based on Sail Arm positions (flap settings covering ranges of degrees of movement shown), display the following text on the gauge.
a. 0- 60 degrees, Display Close Hauled
b. 61-120 degrees, Display Beam Reach
c. 121-150 degrees, Display Broad Reach
d. 151-210 degrees, Display Running
e. 211-240 degrees, Display Broad Reach
f. 241-300 degrees, Display Beam reach
g. 301-359 degrees, Display Close Hauled
I love the FS2X.com site but it does not spend a lot of time explaining conditional statements.
I would appreciate any guidance. Thanks in advance.
Last edited:



- not awake yet 