• 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 Simple Visibility Code Not Working ... RESOLVED

No problem, Milton. That is the basic syntax for scripting any toggle of a custom Boolean variable. The ! simply flip-flops the current value from one state to the opposite.
 
I am having trouble with this switch and I suspect it is because what I am attempting is not allowed. Your thoughts please.
The switch animates okay, has a tooltiptext that shows, and opens the doors.
The eventid is the issue as it does not execute it seems.
Can I have both callbackcode and an eventid in the same structure?

Code:
  <PartInfo>
        <Name>sw_door_2</Name>
        <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
    (L:door2, bool) 50 *
        </Code>
      <Lag>400</Lag>
      </Parameter>
    </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Inner Doors</TooltipText>
    <CallbackCode>
        (L:door2, bool) ! (>L:door2, bool)
        4 (&gt;K:TOGGLE_AIRCRAFT_EXIT)
    </CallbackCode>
            <EventID>TOGGLE_LOGO_LIGHTS</EventID>
        </MouseRect>
    </PartInfo>

I should mention that the geometry that has Logo Lights Attached to it is used to trigger an effect. The effect does not happen so I assume the logo light is not toggled. The effect does trigger if I use the "L" switch so I know the effect is active.
 
Delete the eventid line and execute the K: var from within the CallbackCode bracket, like so:
Code:
<CallbackCode>
   (L:door2, bool) ! (>L:door2, bool)
   4 (>K:TOGGLE_AIRCRAFT_EXIT)
   (>K:TOGGLE_LOGO_LIGHTS)
</CallbackCode>
 
A follow up question regarding the effect appearance:

1) When the effect is invoked through the Smoke System, it looks normal ( as intended);
2) When called from the model attached effect, it appears "blocky" as if its only supported at intervals of time.

Should I change from the lights toggle approach to using the smoke system in the cfg and use the smoke_toggle instead? If so, is there a way to call different smoke system entries to accommodate multiple dump doors?

Any thoughts?

EDIT: Update: I switched the retardant effect to use the smoke system instead of a model attached effect and it works properly now.
 

Attachments

  • smokesystem called effect.jpg
    smokesystem called effect.jpg
    72 KB · Views: 381
  • model attached effect.jpg
    model attached effect.jpg
    63.3 KB · Views: 331
Last edited:
Tom Gibson, (or anyone) would you by chance have the C130 effects packaged mentioned in that thread in your post? I cannot find it anywhere.

I am looking for prop/jet blast and heat shimmer effects for the xf92a delta wing test aircraft.
 
Last edited:
I am curious why this code works in a gauge but not in the model xml callback code.
Is the format supposed to be different? or must it be under code or sim?

The door opens but the smoke entry is not activated.

Code:
  <PartInfo>
        <Name>sw_door_3</Name>
        <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
    (L:door3, bool) 50 *
        </Code>
      <Lag>400</Lag>
      </Parameter>
    </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Outer Doors</TooltipText>
    <CallbackCode>
        (L:door3, bool) ! (>L:door3, bool)
        3 (&gt;K:TOGGLE_AIRCRAFT_EXIT)
        if{ 2 (&gt;K:SMOKE_ON) } els{ 2 (&gt;K:SMOKE_OFF) }    
    </CallbackCode>
        </MouseRect>
    </PartInfo>
 
Were is your condition for this if{ 2 (&gt;K:SMOKE_ON) } els{ 2 (&gt;K:SMOKE_OFF) }

This, 3 (&gt;K:TOGGLE_AIRCRAFT_EXIT) can't be it because it's a command. I've never seen this syntax before. The usual syntax is:
Code:
      <CallbackCode>
        (>K:TOGGLE_AIRCRAFT_EXIT,bool) (>K:SELECT_3,bool)
      </CallbackCode>
This should be in an <Update> section either in a 2d gauge or assigned to a simple box polygon in the model.
Code:
(A:EXIT OPEN:2,percent) if{ 2 (&gt;K:SMOKE_ON) } els{ 2 (&gt;K:SMOKE_OFF) }

The modeldef.xml version of a 2d gauge's <Update> section is as simple as this.

Code:
  <PartInfo>
    <Name>MilViz_Check</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:EXIT OPEN:2,percent) if{ 2 (&gt;K:SMOKE_ON) } els{ 2 (&gt;K:SMOKE_OFF) }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
 
Thanks Bill; obviously, I am like a blind pig trying to stumble upon a corn cob here. :-/

I'll see if I can use your comments to find my way here.

Greatly appreciated. :)

EDIT: Update - it may not be pretty, but it animates the switch, opens the door, and dumps the retardant. Thanks for setting me straight Bill. :-)

Code:
  <PartInfo>
        <Name>sw_door_3</Name>
        <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
    (L:door3, bool) 50 *
        </Code>
      <Lag>400</Lag>
      </Parameter>
    </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>Outer Doors</TooltipText>
    <CallbackCode>
        (L:door3, bool) ! (>L:door3, bool)
        3 (&gt;K:TOGGLE_AIRCRAFT_EXIT)
        (A:EXIT OPEN:2,percent) 0 ! if{ 1 (&gt;K:SMOKE_ON) } els{ 1 (&gt;K:SMOKE_OFF) }
    </CallbackCode>
        </MouseRect>
    </PartInfo>
 
Last edited:
Milton, as you have undoubtedly discovered by now, there are myriad ways goals in XML scripting can be accomplished!

In fact I've learned something new myself, as I never even suspected that one could simply pass a number to the TOGGLE_AIRCRAFT_EXIT command!
 
Indeed, actually I am using 2 different doors and two different smoke effects entries. Works beautifully.

But, I thought I learned the technique from you and others in the post #24 by mjahn and #27 above by Tom Gibson. That was extremely useful to me. Thanks
 
Last edited:
I am working on the XF-92A which was Convair's test project for the Delta wing. (Attachment with textures a WIP by 000Rick000.)
Testing was done at 3-4 different places in different phases, but a primary test bed area was the Salt Flats.
I am trying to determine if there is a "surface Type" for the salt flats but cannot find the FSXA list of surface types, only the FS9 list.

This is what I have for FS9 but curious if you could point me to the FSX list of surface types, or if you know the surface type for the salt flats test area.

Code:
{:0}CONCRETE
{:1}BUMPY
{:2}WATER
{:3}ROUGH
{:4}ASPHALT
{:5}GRASS
{:6}MEADOW
{:7}HARDTURF
{:8}SNOW
{:9}ICE
{:10}URBAN
{:11}FOREST
{:12}DIRT
{:13}CORAL
{:14}GRAVEL
{:15}TARCHIP
{:16}MESH
{:17}BITUMIN
{:18}BRICK
{:19}MACADAM
{:20}PLANKS
{:21}SAND
{:22}SHALE
{:23}TARMAC
{:24}{end}
 

Attachments

  • xf92and.jpg
    xf92and.jpg
    363.7 KB · Views: 351
Last edited:
Depending on the scenery "dirt" is all you have on the ground at Edwards/Muroc.
 
Back
Top