Sign in to follow this  
Slammer

FS9 vs FSX Macro problem

Recommended Posts

Dear all,

 

I'm having problems with Macro's. Format for FS9 2d cockpit works in FSX, but in FSX format it doesn't work. Can anyone help?

FS9 code 2d works in FSX:

<Macro Name="Increase">
(L:DataEntry, number) 10 * @1 + (>L:DataEntry, number) 
</Macro> 
<Macro Name="Decrease">
(L:DataEntry, number) 10 / int (>L:DataEntry, number) 
</Macro>

<!-- ********* 1 Digit  **********-->
<Area Left="36" Right="66" Top="53" Bottom="83">
<Visible>(L:ICP-MODE, enum) 0 != (L:ICP-MODE, enum) 7 != (L:ICP-MODE, enum) 13 != (L:ICP-SEC1, enum) 4 != ||</Visible>
<Cursor Type="Hand"/>
<Click>
@Increase(1)
</Click>
</Area> 

FSX code for 3d Virtual cockpit doesn't work:

<Macro Name="Increase">
<MacroValue>(L:DataEntry, number) 10 * @1 + (>L:DataEntry, number)</MacroValue> </Macro> 
  
<Macro Name="Decrease">
<MacroValue>(L:DataEntry, number) 10 / int (>L:DataEntry, number)</MacroValue> 
</Macro> 

<!-- ********* 1 Digit  **********--> 
<MouseArea>
<FloatPosition>107.000,102.000</FloatPosition>
<Size>95,94</Size>
<Visibility>(L:ICP-MODE, enum) 0 != (L:ICP-MODE, enum) 7 != (L:ICP-MODE, enum) 13 != (L:ICP-SEC1, enum) 4 != ||</Visibility>
<CursorType>Hand</CursorType>
<MouseClick id="MouseClick">
<Script>@Increase(1)</Script>
<ClickType>LeftSingle</ClickType>
</MouseClick>
</MouseArea>

 

 

Thnx in advance!

 

Greetz Slammer

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

 

3 hours ago, Slammer said:

FSX code for 3d Virtual cockpit doesn't work:

Hi, 

Modeldef.xml file for 3D VC animations does not support macros.

Tom

 

Share this post


Link to post
Share on other sites

Tom,

 

Thanks for your answer, is there anyway around it to cope with the problem?

 

Greetz Slammer

Share this post


Link to post
Share on other sites

I'm afraid not.

Some workaround might be done in parts callbacks, but I cannot think of anything  in Mouse scripts.

Tom

 

 

 

 

Share this post


Link to post
Share on other sites

It might be possible by putting the logic (and @Macros) in a 2d 'gauge' and use trigger L:Vars in the modeldef.xml file, but honestly it would likely be more trouble than it's worth...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this