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

FSXA Glide needle ON-OFF

Messages
61
Country
france
I want to control the glideslope needle with an ON-OFF switch.
Without the switch, this code works correctly.:)

Code:
<PartInfo>
    <Name>00-NORD_needle_ILS1_Glide</Name>
    <AnimLength>238</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:NAV GSI:1, Number) 119 + </Code>
        <Lag>300</Lag>
      </Parameter>
    </Animation>
  </PartInfo>


But if I change these lines, it no longer works.:confused:

Code:
<PartInfo>
    <Name>00-NORD_needle_ILS1_Glide</Name>
    <AnimLength>238</AnimLength>
    <Animation>
      <Parameter>
        <Code>
	  [COLOR="Red"][B] (L:NORD_ILS1_ON-OFF,number) 0 == 	  
	   if{ 119 (&gt;A:NAV GSI:1, Number) } <!-- needle deactivated -->
	   els{ (A:NAV GSI:1, Number) 119 + } <!-- needle activated -->[/B][/COLOR] 
        </Code
       <Lag>300</Lag>
      </Parameter>
    </Animation>
   </PartInfo>

Thank for your help.
 
A: tokens are read only. You need to use the approprite K: token.

Try this first:-

Code:
	   (L:NORD_ILS1_ON-OFF,number) 0 == 	  
	   if{ 119 } <!-- needle deactivated -->
	   els{ (A:NAV GSI:1, Number) 119 + } <!-- needle activated -->

Ted
 
OK, but what is the appropriate Event ID ?

I'm unable to find it in the SDK.

You won't find one because no such event exists!

What he was commenting on is with regards this part of your script:

Code:
if{ 119 (&gt;A:NAV GSI:1, Number) }
You wanted to shove 119 into an A:variable. That cannot be done as A:vars are "read only!"

So, instead of doing the above (which cannot work), he suggests this that will work:

Code:
if{ 119 }
 
New problem:
I want that several conditions are satisfied.
If one isn't, the glide needle should be disabled.
I thought I would succeed with this code. But only the last condition is working.

Code:
<PartInfo>
    <Name>00-NORD_needle_ILS1_Glide</Name>
    <AnimLength>238</AnimLength>
    <Animation>
      <Parameter>
        <Code>
	(A:ELECTRICAL MASTER BATTERY,bool) 0 ==
	(L:NORD_Nav1_ON-OFF,number) 0 == OR
	(L:NORD_ILS1_ON-OFF,number) 0 == OR	  
	if{ 119 } <!-- needle deactivated -->
	els{ (A:NAV GSI:1, Number) 119 + } <!-- needle activated --> 
        </Code>
       <Lag>300</Lag>
      </Parameter>
    </Animation>
   </PartInfo>

Thank for your help.
 
The conditional must be lower-case only!

OR - won't work!

or - will work!
 
Back
Top