• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 3way switch code problem

Ditto for me as well, Tom. I could script the entire thing in about 20 minutes or possibly less.
 
Don't want to sound like a jerk. I read most of the thread here and think you will get something close to what you want. But without C++ you are limited to sharing codes. So I have a simple rule. Do not try to over use variables from too many sources, because you end up with too many arguments. And the end result forces you to simplify.

On the other hand as you get better at XML coding, you will make more complex codes without a headache:tongue-ti.

My favorite 3 way switch has one direction that returns and resets the circuit. The other direction is clickable with center being off.

Good luck on your switch, Sincerely DG;)
 
Tom and everybody
I would love to loose the fool the eye dodge and write code to do the job.
But at my skill level, I can't. I do not understand enough of the what, how and why of expressions telling the L variable to do this or that and if that is not this do the other thing.

I realize I am bloody looney in the way I do things. But The end results are what count. Delivery guy pointed out. As I learn more xml I will be able to write more complex code. I would not learn anything if Bill were to post the perfect code. So please bear with me and my looney ways, continue to critiqe my ratty coding and weird ideas. I greatly appreciate the help all of you have given me. Many Thanks!

Carl
 
Guys

Sorry about the short post earlier. But I had some trial and error to do. It took about 2 hours but I got the circuit working correctly. I got the red 3 way toggle slaved to the blue 3 way toggle's movement with this code for the blue toggle:

Code:
<part>
    <name>switch_light_section_off</name>
    <animation>
      <parameter>
        <code>
          25 (L:switch_light_section_off, 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_off, enum) -- -1 max (>L:switch_light_section_off, enum) and (L:switch_light_section_on, enum) -- -1 max (>L:switch_light_section_on, enum)  }
        (M:Event) 'RightSingle' scmp 0 ==
        if{ (L:switch_light_section_off, enum) ++  1 min (>L:switch_light_section_off, enum) and (L:switch_light_section_on, enum) ++  1 min (>L:switch_light_section_on, enum) }
      </callback_code>
    </mouserect>
  </part>

I fixed the down circuit display problems caused by the slaving. Then I removed the polys from the red 3 way toggle leaving 4 vertices making it effectively invisible and cutting around 200 polys from the overall model! Nice bonus that! Changed the blue 3 way's parent to the X700 anchor node so it would display all the time as the clickable master display of the toggle, then deleted the vir part I was using to hide it when the master battery switch was moved to the on position. Only a single poly cut there but you can't always get a nice bonus. Auto weld got the body of the blue switch when I reparented it but left me the top spot to click on. Here is a vid of the controll switches and lights functioning correctly.

http://www.pendercrafts.com/Carls folder/Fldr01/fin demo.avi

Or almost! I sent a copy of the vid to my editor and got a nasty gram back. It seems the section light flash setting is not an automated flash but a momentary flash controlled by a keying switch located elswhere on the panel. This circuit will function perfectly for the formation, recognition and running lights which do have automated flash though. And I do not think inserting the keying switch for the section light's flash will be much of a problem.

Thank you again for everyone's help!!!

Carl
 
I would not learn anything if Bill were to post the perfect code.

That is the precise reason I do not post "complete solutions" unless it is as an absolute last resort...

...so, I try to teach how to think through a problem using logic, then show how to achieve that logic through Reverse Polish thinking... :teacher:
 
Right you are Bill! To paraphrase an old saying "Give a man the answer to his problem you solve his problem for that day. Teach him to solve his problems you have solved his problems for a lifetime."

I hate bothering the nice folks here with my newbie questions. I only do so after all other options have been exausted. I search for work arounds like my fool the eye / slight of hand gags to make what little I do understand work as close to the total, perfect historicaly accurate functions my editor demands. I usually work on a problem for at least a couple of weeks before even considering asking for help. Luckily the problems are coming with less frequency this 3 way switch fix solves most of my remaining switch/circuit issues as you can see from this pic of the lighting portion of the panel:
Aupper%20switches.bmp

I still have to do the running ,formation and recognition light circuits. But with the working command /control circuit code you guys have helped me work out for the section light, the other light circuits should pose no serious problems.

The funny thing is all this command and control circuitry is only going to be of importance when the engine is off. This quaote from the pilots manual:
Abattery%20switches.bmp

Means another fool the eye gag with the battery switch and a couple of vir parts. That is just work though not a "problem" I understand how thanks to you guys teaching me how to solve my problems! I Thank you All! Again!

....Uh you understand this does not mean I won't have problems in the future requireing your critques and advice. But I will try to solve them to the limits of my understanding before posting a request for help.

Carl
 
Back
Top