• 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.

Optional Hold Down Click?

Messages
10,163
Country
us-arizona
Hey all,

It came to me how one might model dual fuel selectors for a single engine. Create two animations for two objects. Next, in one animation, you have click 'on-LH tank' and 'off'. On the second, you have 'on-RH tank' and 'off'.

So, when you click on the opposite side, it should then go to 'RH tank' from LH tank, and double clicking it (two normal clicks) should then turn off all selectors, done at one selector.

The down side is that clicking on one side, you effect the other side, so the realism is gone in that respect, but you at least have two different animations for two different tank selections.


A quick question though. How does one write code for 'holding down' the mouse on a part and you get 'another' command? For instance, you have a knob that does on/off, but can also have the knob have a secondary command by holding down the mouse for say 2 full seconds or more.

What I would like to do is make these selectors to where one can go to 'both' selectors (all tanks selected, all selectors in on positions) by holding down the left mouse on one side (one of the two selectors).

Bill
 
You could add some logic where depending on the position of the switches the fuel selector is set.
Code:
       RgtOn RgtOff
LftOn  Both  Left
LftOff Right None
Then clicking the switches will just toggle them on/off and then run the logic.
 
On my oxygen panel I have a red emergency "Pull" knob activated manually or automatically. The system has to be equalised with the barometric pressure during the pre-flight which necessitates "pushing" the knob. This releases oxygen into the system and the consequent dial registers pressure after holding the knob pressed in for 5 seconds. The push is controlled by RightSingle+RightRelease.
Code:
 <Mouse>
     <Tooltip>Emergency Oxygen %( (L:redpull,bool) )%{if}Out (Press to Reset)%{else}%( (L:redpush,bool) )%{if}Test (hold for 5 secs)%{else}In (Press to Test)%{end}</Tooltip>
      <Cursor Type="Hand"/>
<Click Kind="LeftSingle+[COLOR="Red"]RightSingle+RightRelease[/COLOR]">
       (M:Event) 'LeftSingle' scmp 0 == if{ (L:redpull,bool) 0 != if{ 0 (&gt;L:redpull,bool) 1 (>L:Sound_button,enum) 0 (>L:Oxy_On,bool) 1 (>L:OXYGEN 100,number) 0 (>L:ox_press,number) 0 (>L:OxyFlow,number) 0 (>L:mageye,bool) } els{ 1 (&gt;L:redpull,bool) 1 (>L:Sound_button,enum) 1 (>L:Oxy_On,bool) 0 (>L:OXYGEN 100,number) 4 (>L:ox_press,number) 4 (>L:OxyFlow,number) 1 (>L:mageye,bool) } }
[COLOR="Red"](M:Event) 'RightSingle' scmp 0 == if{ (L:redpush,bool) 0 != if{ 0 (&gt;L:redpush,bool) 0 (>L:Oxy_On,bool) 1 (>L:OXYGEN 100,number) 0 (>L:ox_press,number) 0 (>L:OxyFlow,number) (P:local time, seconds) 0.00 + (>L:barometric_equalisation,number) 0 (>L:mageye,bool) } els{ 1 (&gt;L:redpush,bool) 1 (>L:Oxy_On,bool) 0 (>L:OXYGEN 100,number) 2 (>L:ox_press,number) 2 (>L:OxyFlow,number) (P:local time, seconds) 5.00 + (>L:barometric_equalisation,number) 1 (>L:mageye,bool) } }[/COLOR]

(M:Event) 'RightRelease' scmp 0 == if{ (L:redpush,bool) 0 != if{ 0 (&gt;L:redpush,bool) 0 (>L:Oxy_On,bool) 1 (>L:OXYGEN 100,number) 0 (>L:ox_press,number) 0 (>L:OxyFlow,number) 0 (>L:mageye,bool) } els{ 1 (&gt;L:redpush,bool) 1 (>L:Oxy_On,bool) 0 (>L:OXYGEN 100,number) 2 (>L:ox_press,number) 2 (>L:OxyFlow,number) 1 (>L:mageye,bool) } }
    </Click>
   </Mouse>

The next code shows how the pressure gauge reacts to the knob being pressed.
Code:
<Value>(L:barometric_equalisation,number) (P:local time, seconds) &lt; if{ (L:greenpull,bool) 1 == (L:redpull,bool) 1 == | (L:redpush,bool) 1 == || (L:interconnect,bool) 1 == and (L:crewsupply,bool) 1 == and (L:paxsupply,bool) 1 == | }
if{ (L:OxyFlow,number) }</Value>

And this code shows how the magnetic indicator reacts
Code:
<Value>(L:barometric_equalisation,number) (P:local time, seconds) &lt; if{ (L:greenpull,bool) 1 == (L:redpull,bool) 1 == | (L:redpush,bool) 1 == | (L:interconnect,bool) 1 == and (L:crewsupply,bool) 1 == and (L:paxsupply,bool) 1 == | }
if{ (L:mageye,bool) }</Value>
vololiberista
 
Many thanks VoloLiberista!

It will be interesting to see if I can get this working right.


Thanks Jeroen for the input.

The deal is that in FS, with the base coding of the sim, you can only have 'one' fuel selector per engine. So if you have 4 engines you can have 4 fuel selectors, but a single engine plane can officially only have 1 fuel selector. I hope this can side-step that rule 'and' function.



Bill
 
Thanks Jeroen for the input.

The deal is that in FS, with the base coding of the sim, you can only have 'one' fuel selector per engine. So if you have 4 engines you can have 4 fuel selectors, but a single engine plane can officially only have 1 fuel selector. I hope this can side-step that rule 'and' function.
My idea was to use the logic in between the single fuelselector of FS and the two fuel selectors in the cockpit.
The position of the cockpit fuelselectors would then be stored in L:Vars.
 
Back
Top