XML: Variable Limiting: Difference between revisions
From FSDeveloper Wiki
Jump to navigationJump to search
(New page: Local Variable are often incremented and/or decremented by the value of 1 using ++ or --. The following is a simple way to limit the max and min value. (L:Variable, number) ++ 30 min (>...) |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Infobox-Applicable-FSVersion | |||
| FSXI = false | |||
| FSXA = true | |||
| FSX = true | |||
| FS2004 = true | |||
| FS2002 = false | |||
| XP10 = false | |||
| XP9 = false | |||
}} | |||
==XML: Variable Limiting== | |||
Local Variable are often incremented and/or decremented by the value of 1 using ++ or --. The following is a simple way to limit the max and min value. | Local Variable are often incremented and/or decremented by the value of 1 using ++ or --. The following is a simple way to limit the max and min value. | ||
Latest revision as of 12:07, 4 September 2011
XML: Variable Limiting
Local Variable are often incremented and/or decremented by the value of 1 using ++ or --. The following is a simple way to limit the max and min value.
(L:Variable, number) ++ 30 min (>L:Variable, Number)
This increments the variable by 1, then compares it with your maximum desired value, in this case 30, then assigns the lower of the 2 values to the variable.
(L:Variable, number) -- 0 max (>L:Variable, Number)
This decrements the variable by 1, then compares it with your minimum desired value, in this case 0, then assigns the greater of the 2 values to the variable.