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

Help with Macro not working

Messages
137
Country
us-southcarolina
I'm using part of Bjoern K's Airbus callouts gauge to play some callouts in my HUD/Panel. It uses a macro "altitude" to control which callout sounds to play. I want to modify it so I can include the deck height of a carrier if I'm landing on a carrier. I created and control (L:CarrierLanding, bool) and (L:CarrierDeckHt, number) in another gauge in my panel.
The macro "altitude" is used in the sound control gauge is used to pass the altitude on so it know which sound to play etc. the original is
Code:
<Macro id="Altitude" Name="Altitude">
      <MacroValue>(A:Radio Height,feet) (A:STATIC CG TO GROUND,feet) -
       </MacroValue>
</Macro>

I modified it to this but can't get it to work
Code:
<Macro id="Altitude" Name="Altitude">
   <MacroValue>(L:CarrierLanding, bool)
    if{(A:Radio Height,feet) (A:STATIC CG TO GROUND,feet) - (L:CarrierDeckHt, number) - }
    els{(A:Radio Height,feet) (A:STATIC CG TO GROUND,feet) - }
 </MacroValue>
</Macro>

I can't figure out why this won't work, I must be missing something.
This is FSX ACExml. also i did check and my L:vars are being created and to contain the desired info.

Thanks
Joel
 
Last edited:
That got it. thanks
I have problems on where and where not to add a space. I think there are more "add a space" places than not ?? Can you point me to a resource for this info ?

Thanks
Joel
 
No further info required. Just use a space between every part of an expression except "if{" and "els{", e.g. "if{ (L:A,enum) 40 * (L:varB,bool) * d (>L:VarC,number) (>G:Var1) }".
 
No further info required. Just use a space between every part of an expression except "if{" and "els{", e.g. "if{ (L:A,enum) 40 * (L:varB,bool) * d (>L:VarC,number) (>G:Var1) }".
Got it
thanks for the prompt reply.

BTW I had a question about your use of DSD sound gauge in your Airbus calls gauge...
I have several other gauges that use the same sound gauge. While i know it would take some re-writing of file paths, calls in the XML, and placement in the ini, etc. is there any reason one couldn't consoladate those items to use the same instance of the DSD sound gauge ?

Joel
 
Got it
I have several other gauges that use the same sound gauge. While i know it would take some re-writing of file paths, calls in the XML, and placement in the ini, etc. is there any reason one couldn't consoladate those items to use the same instance of the DSD cound gauge ?

Surely you can. Just amend the .ini file with the other sounds and their variables. But make sure that the paths to the .wav files are correct.
 
Back
Top