-
Content Count
52 -
Donations
$150.00 -
Joined
-
Last visited
Content Type
Profiles
Forums
AVSIM
Media Demo
Downloads
Gallery
Blogs
Forms
Everything posted by tedcook
-
XML IF Statement Help Needed
tedcook replied to ark's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
There is always a space after the opening { and a space before the closing }. %((L:AdjDir,degrees) 360 > if{(L:AdjDir,degrees) 360 - (>L:AdjDir,degrees)}) ^ ^ -
This is the advice that I have followed and it works. I downloaded it from one of the forums about two PC upgrades ago and I have lost the souce so my apologies to the author. Ted
-
My original Web Hosting service is no longer supported so I have moved my Homepage to :- www.tedcook.me.uk/Homepage Sorry for the inconvenience but I had no warning. Regards, Ted.
-
The spoiler and reverser are default parts which will be contained in the model file. The timing for the spoilers is done in the aircraft.cfg similar to this:- [airplane_geometry] : : spoiler_limit =0.1 spoiler_extension_time =2.0 <===== spoiler_handle_available =1 : : There is also an entry in the *.air file, Section 1101, for 'Spoiler Cycle Time (secs) = 2.00000 ' I cannot find any entry defining the reverser timing. The XML code syntax requires a space after every { and a space before every } thus:- Element> <Select> <Value> <!-- Right Spoiler --> (A:SIM ON GROUND, bool) 1 == (A:SPOILERS HANDLE POSITION,percent) 2 > & if{ 100 } els{ 0 } (>L:GroundSpoiler2,percent) <!-- Left Spoiler --> (A:SIM ON GROUND, bool) 1 == (A:SPOILERS HANDLE POSITION,percent) 2 > & if{ 100 } els{ 0 } (>L:GroundSpoiler1,percent) </Value> </Select> </Element> <Element> <Select> <Value> (A:TURB ENG REVERSE NOZZLE PERCENT:1,percent) 1 > if{ 100 } els{ 0 } (>L:LeftReverser,number) (A:TURB ENG REVERSE NOZZLE PERCENT:2,percent) 1 > if{ 100 } els{ 0 } (>L:RightReverser,number) </Value> </Select> </Element> Regards, Ted.
-
Colibri. A week ago I got a new Cyborg X F.L.Y. joystick and,after assembly, some buttons and one axis did not work. I traced the problem to dirty contacts on the handle section. I believe a patina can form whilst the stick is in store since the handle is packed seperately with the pins exposed..I disconnected the handle and carefully cleaned each pin with a hard pencil eraser.Since the pins are spring loaded check, again carefully, that they move freely.I also re-calibrated the sensitivity and dead-band sections in Flight Sim. just to be sure.Regards, Ted.
-
Just terrible - The searches I tried that were successful had no pictures and there is no way to browse for a type of aircraft.
-
XML: Need help with K event
tedcook replied to V02's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Try K:THROTTLE_CUT or K:THROTTLE1_CUT " sets throttle to idle" [ from the SDK - Event IDs]Ted. -
Duplicate values from one part
tedcook replied to tedcook's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
I abandoned the <callback_dragging> route and finally had some success with this cunning code. 'LULU' is my test modelNote that I needed the minimum mixture to be 27% but it was developed using 0% as the minimum. Just change the 0.27 and 4424 values to 0. <part> <name>lever_double_mixture</name> <!-- LULU --> <animation> <rotation>Y</rotation> <parameter> <code> (A:GENERAL ENG MIXTURE LEVER POSITION:2,part) 0.27 max 1 min 100 * </code> </parameter> </animation> <mouserect> <cursor>Hand</cursor> <tooltip_text>Port mixtures</tooltip_text> <mouse_flags>LeftSingle+LeftDrag</mouse_flags> <callback_code> (M:Event) 'LeftSingle' scmp 0 != if{ (L:Pmixref, position) 0 != if{ (L:Pmixref, position) (M:Y) - 400 / /-/ (A:General eng mixture lever position:2,part) + 16384 * int 16384 min 4424 max d (>K:MIXTURE1_SET) (>K:MIXTURE2_SET) } } (M:Y) (>L:Pmixref, position) </callback_code> </mouserect></part> -
Duplicate values from one part
tedcook replied to tedcook's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Thanks for the fast reply. Can the <callback_code> tags be wrapped in <callback_dragging> tags ?I have had a look in the default MakeMdl.parts file but there is no part like that to examine.I have tried to get the value that is passed to the <event_id> to be passed into the <callback_code> but nothing happens. The cursor appears with the usual grabbing action but thats all.I am now trying to get a proper dragging action using a simple <callback_code> in the <mouserect> section. -
fs9 - FSDS351 - Win XP I am doing the VC of a 4 piston engined aircraft. The Mixture levers control two engines each, left and right pairs. I have the cockpit view XML gauges working properly as I can set both the (K:..._SET ) values in the same line of code with a simple 'd' [duplicate] command.My problem is that I cannot do a similar thing in the 'MakeMDL <part>' gauge, something like this:- <mouserect> <cursor>Hand</cursor> <help_id>HELPID_GAUGE_THROTTLE_MIXTURE</help_id> <tooltip_id>TOOLTIPTEXT_THROTTLE_MIXTURE_PERCENT</tooltip_id> <mouse_flags>LeftSingle+LeftDrag</mouse_flags> <callback_dragging> <variable>GENERAL ENG MIXTURE LEVER POSITION:1</variable> <units>percent</units> <scale>163.84</scale> <yscale>163.84</yscale> <minvalue>4424</minvalue> <maxvalue>16384</maxvalue> d <event_id>MIXTURE1_SET</event_id> <event_id>MIXTURE2_SET</event_id> </callback_dragging> </mouserect> I have a <callback_code> routine that looked promising but after four days of tweaking I am unable to get an acceptable outputI cannot use an invisible lever since there is another pair of control levers that do a similar thing but for the outboard and inboard engines.Ted.
-
xml file
tedcook replied to mondeoman's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Try these references to get you started.-----------------For a good reference list by Arne Bartels http://www.flightsim.com/ Go to the library and search for xmlgau01.zip .-------------------Nick Pike has lots of help at:-http://fs2x.com/ Go to... Tutorial\Tutorial1\Section1 Download chapters 1,2 and 3. Also look in the XML Reference list.-------------------http://www.scenery.org/tutorials_fs2k4_SDK.htm for the FS2004 SDKs--------------------Regards, Ted. -
There are three default AI aircraft in FS2004 the 'dh_dash8_100, the 'md_83 and the 'Piper_PA28_180.These do not show up in the list since they cannot be flown by thr user directly.To check the sort of aircraft you are looking at, open the *.air file for that aircraft and examine item 105 near the top of the list.Aircraft Type = 0 means a normal aircraft, Aircraft Type = 1 means a helicopter and Aircraft Type = 2 means an AI arcraft.Regards, Ted.
-
XML Guage not appearing
tedcook replied to a topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Just finger trouble by the looks of it. <Gauge Name="Vsi thingy"> // Is the code within <Gauge> tags ?? <Image Name="VSI-BACK.bmp" Bright="Yes" ImageSizes="100,400" /> // the closing / was missing <Element> <Position X="340" Y="60" /> // the closing " was missing <Image Name="VSI-ARROW.bmp" Bright="Yes" ImageSizes="39,25"> // the = after the Image Name was missing <Axis X="70" Y="200" PointsTo="East"/> </Image> <Rotate> <Value Minimum="-15" Maximum="15">(A:Vertical speed,feet per minute) 100 /</Value> <Nonlinearity> <Item Value="-15" X="30" Y="291"/> <Item Value="-10" X="30" Y="264"/> <Item Value="-5" X="30" Y="227"/> <Item Value="0" X="30" Y="291"/> <Item Value="5" X="30" Y="172"/> <Item Value="10" X="30" Y="144"/> <Item Value="15" X="30" Y="116"/> </Nonlinearity> <Delay DegreesPerSecond="25"/> </Rotate> </Element> </Gauge> Regards Ted. -
XML has beaten me!
tedcook replied to geoffco's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Geoff. Try the 'range' variable rng thus:- <visible>26500 27499 (A:total weight, Kg) rng</visible> Regards, Ted. -
Xml Gauge Help Needed!
tedcook replied to a topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
You are missing the closing parenthesis:-(A:GENERAL ENG1 RPM,rpm) 100 < if{ 0 (>K:COWLFLAP1_SET) } els{ 16383 (>K:COWLFLAP1_SET) } -
Fuel used gauge
tedcook replied to old_doggie's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Try:-%((G:Var2) (A:fuel left quantity,gallons) 2.72 * near - (G:Var1) *)%!04s!Get the ' 2.72 ' weight per gallon factor from the *.air file item No 312 which is in pounds and convert it to Kgs.Regards, Ted. -
Can't see why this does not work
tedcook replied to Alba's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
KennyI tried these codes in my DH Don which uses >> Bendix-King Radio Nav-Comm 1 << gauge and the STANDBY frequencies update correctly in both the COM and the NAV1 sections.Regards, Ted -
Electrical System Help Please
tedcook replied to Bob Familton's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Bob The token is just for the No. 1 engine { :1 }'If I want all four do I substitute 2,3,and 4 where the 1 is above?'YES. It seems that the total current is distributed over all the Generators you have activated in game. When you switch one off then the other(s) share the load.Ted. -
Electrical System Help Please
tedcook replied to Bob Familton's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Bob Try.... (A:Electrical genalt bus amps:1,amps)I don't think fs9 discriminates between DC and AC generators.Regards, Ted.PS.Can you have a negative current on an AC alternator ? -
Re. Total fuel gauge
tedcook replied to Alba's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
Try %!08.2f! dot instead of a comma.Regards, Ted -
Moving image in gauge
tedcook replied to ias's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
You can choose any name you want for any of your L: variables but as they can be seen by all the other gauges it HAS to be Unique.You insert values by using the 'Greater Than' symbol as shown below -------------------------------Insert the function immediately after the header which will change the (L:Maxsbug,number) start value from zero to 60 the first time the gauge is accessed and then do nothing. (L:Bugstart,bool) ! if{ 60 (>L:Maxsbug,number) 1 (>L:Bugstart,bool) } Et. seq.............----------------------In the sections you can insert the following. The if{ .... } statement will only be used if (L:Maxsbug,number) is in the Range of 60 to 399The ++ will increment (L:Maxsbug,number) by one. 60 399 (L:Maxsbug,number) rng if{ (L:Maxsbug,number) ++ (>L:Maxsbug,number) } Decrementing is similar ( 59 400 and -- )-----------------------You now don't need to delimit the statement, so you can use:-(L:Maxsbug,number)Take care with the spaces and semicolons.Regards, Ted -
Moving image in gauge
tedcook replied to ias's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
You need to use your own custom L: variable -- say (L:Maxsbug,number)(L:Maxsbug,number)Remember that the L: variables initialise at 0 (zero) so you must either adjust the value range or insert an statement in the start of the gauge code.The (L:Maxsbug,number) must then be set in the section with two one which increments (L:Maxsbug,number) and one which decrements it. Don't forget to delimit the values to 60 and 400 in both cases you will then only need a simple statement.Best of luck, Ted.