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

FSX Fix the Wake effect Gauge

Messages
28
The contact point system is annoying, and I'll tell you why I think that. About 4 years ago a lot of people were asking why the Goose had no Wake. I tested and tested until I came to the conclusion that all type 4 contact points on an aircraft need to be in contact with the water at the same time for a wake to be displayed. Later on, OzX further proved this to me when they released an upgraded set of files for the Goose, of which the wing float contact points were lowered so that a wake was present. That of course looks and acts unrealistically.

My new goal, because I like the way a Goose tilts in the water, and I want the wake effect, is to build a gauge the display the wake effect when the Goose is on water. I referenced this... http://www.fsdeveloper.com/forum/showthread.php?t=92984&highlight=gauge+effect&page=2 and discovered that the smokesystem is the best way to 'emit' the effect using a gauge.

Now the code in there is based on an airspeed, and I want it based on a condition of on water/not on water. I searched through the SDK and found the simulation variables: SURFACE TYPE enum, and SIM ON GROUND Bool. I don't know if you can do anything with these though. I mean, I really don't know how to code that in. If you can point me in the right direction that'd be great.
 
Here's what I tried, but I don't know if it's coded correctly:

Code:
<Gauge Name="GooseWakeEffect" Version="1.0">
  <Element>
    <Select>
      <Value> 
        (A:SURFACE TYPE,enum) 2; (A:SIM ON GROUND,bool) ; &amp&amp;
        if{ 1 (>K:SMOKE_ON) }
        els{ 1 (>K:SMOKE_OFF) }
      </Value>
    </Select>
  </Element>
</Gauge>

I tried this and it doesn't work. The surface type 2 is water. I don't know if I need any digit for the sim on ground variable. Also I cab'ed the gauge (that part I'm comfortable with) and wrote it in the panel.cfg under [VCockpit01]. Is that where a problem is? Maybe it's won't do the effect outside if it's in the cockpit? IDK, lost and need your expertise.
 
Last edited:
This is as far I got reading up, but it still doesn't work. Can't see what I'm missing. The effect in the aircraft.cfg is labelled smoke.1 and I read that { 2 (>SMOKE_ON) } controls that operation. What I'm missing I can't see.

Code:
<Gauge Name="GooseWakeEffect" Version="1.0">
  <Element>
    <Select>
      <Value> 
        (A:SURFACE TYPE,enum) 2; (A:SIM ON GROUND,bool) 1; &amp;&amp;
        if{ 2 (>K:SMOKE_ON) }
        els{ 2 (>K:SMOKE_OFF) }
      </Value>
    </Select>
  </Element>
</Gauge>
 
Okay, so I added a smoke.0 and a smoke.2 in the aircraft.cfg. Now the smoke.0 does nothing, but having both Smoke.1 and Smoke.2 one then the gauge works.

It doesn't work if I have only Smoke.1 or only Smoke.2 listed, they have to both be listed for the effect to show. Why is this?
 
Alright, it's all straightened out, I see that the stuff I read about integer 1 controlling Smoke.2 is wrong. 1 controls Smoke.1.

Now the issue is that the effect continues onto land. So that means the variable "SURFACE TYPE" isn't working properly. How do I get my gauge to function the wake under only both conditions, not just one or the other(which I'm assuming it's doing right now)?

Code:
<Gauge Name="GooseWakeEffect" Version="1.0">
  <Element>
    <Select>
      <Value> 
        (A:SURFACE TYPE,enum) 2; (A:SIM ON GROUND,bool) 1; &amp;&amp;
        if{ 1 (>K:SMOKE_ON) }
        els{ 1 (>K:SMOKE_OFF) }
      </Value>
    </Select>
  </Element>
</Gauge>
 
Your code is corrupted. Try with this one:
Code:
(A:SURFACE TYPE,enum) 2 == (A:SIM ON GROUND,bool) 1 == &amp;&amp;
 
Luka is correct. You must be a long-time C(something) programmer, as you have this habit of placing semi-colons (;) in the scripts!

This will "break" the script's parsing engine so that your conditions are never even (*correctly, as intended*) evaluated... :D
 
Last edited:
This will "break" the script's parsing engine so that your conditions are never even evaluated... :D

No. The script is indeed evaluated but 2; and 1; are discarded. So it becomes:

Code:
<Value> 
    (A:SURFACE TYPE,enum)  (A:SIM ON GROUND,bool)  &amp;&amp;
    if{ 1 (>K:SMOKE_ON) }
    els{ 1 (>K:SMOKE_OFF) }
</Value>

Which is true for any surface code but 0. That's the reason he obtains a true in water and in asphalt.

To make it work properly, few changes are needed:

Code:
<Value> 
    (A:SURFACE TYPE,enum)  2 == (A:SIM ON GROUND,bool) 1 == and
    if{ (A:SMOKE ENABLE,bool) 0 == if{ (>K:SMOKE_ON) } }
    els{ (A:SMOKE ENABLE,bool) 1 ==  if{ (>K:SMOKE_OFF) } }
</Value>

Hope this helps.

Tom
 
Code:
<Value> 
    ...
    if{ [COLOR="Red"](A:SMOKE ENABLE,bool) 0 == if[/COLOR]{ (>K:SMOKE_ON) } }
    els{ [COLOR="red"](A:SMOKE ENABLE,bool) 1 ==  if[/COLOR]{ (>K:SMOKE_OFF) } }
</Value>
This is OK (and recommended) in fs9, but there may be a problem since @LuftWayfarer uses multiple smoke effects.
Is there a way to determine for each fsx-smoke whether on or off?
 
This is OK (and recommended) in fs9, but there may be a problem since @LuftWayfarer uses multiple smoke effects.
Is there a way to determine for each fsx-smoke whether on or off?

Hmm, I think he actually wanted only one smoke effect, but couldn't figure out how to properly do that.
Anyway, you can use a Local Var to keep record of the current smoke enabled.

Like (L:Smoke_on,number) 5 != if{ 5 (>K:SMOKE_ON) 5 (>L:Smoke_on,number) }

5 being the fifth line of Smoke.n in aircraft.cfg (no matter the value of .n)

also (>K:SMOKE_ON) without an index turns on all smoke effects at a time, and (>K:SMOKE_OFF) does the same otherwise.

Tom
 
Thank you Tom. This will save me hours of experimenting in my current project.
 
I do have more than one smoke effect in the gauge. The other smoke effect displays an object next to the exit (a ladder, and that has it's own set of issues with the sim crashing because of no preloaded object). So it's important that I keep this pretty neat and tidy. I'll try them out and report back with the results.
 
I do have more than one smoke effect in the gauge. The other smoke effect displays an object next to the exit (a ladder, and that has it's own set of issues with the sim crashing because of no preloaded object). So it's important that I keep this pretty neat and tidy. I'll try them out and report back with the results.

Just beware smoke effects are enabled only when ENGn COMBUSTION var is true, what means at least one engine is running.

Tom
 
No. The script is indeed evaluated but 2; and 1; are discarded.

Okay, being pedantic I should have added the conditional "...correctly." at the end of my sentence. Nonetheless, the extraneous semi-colons will cause the intended action to fail, which is of course the major point. :rolleyes:
 
You guys are good! This works for both effects... I get a wake when only on water, and I get a ladder object next to the exit when I open the door(as long as the engine is running :))

Code:
<Gauge Name="GooseWakeEffect" Version="1.0">
  <Element>
    <Select>
      <Value> 
        (A:SURFACE TYPE,enum) 2 == (A:SIM ON GROUND,bool) 1 == &amp;&amp;
        if{ 1 (>K:SMOKE_ON) }
        els{ 1 (>K:SMOKE_OFF) }
      </Value>
    </Select>
  </Element>
  <Element>
    <Select>
      <Value> 
        (A:EXIT OPEN,percent) 90 &gt;
        if{ 2 (>K:SMOKE_ON) }
        els{ 2 (>K:SMOKE_OFF) }
      </Value>
    </Select>
  </Element>
</Gauge>

NOTE: the ladder is for testing purposes. I have to have the scenery object placed at a location and then park near enough, that it's loaded into the scenery, for the effect from opening the door to display the ladder. It crashes the sim if the ladder isn't preloaded into the scenery. I can't think of a work around for this, but as is, I'm as close to a reality of adding objects to a model without editing the model as I think we can get.
 
Last edited:
Result Photo: Shows not all contact points are in contact with the water, while a Wake effect is present.

2012-4-23_16-21-44-790.jpg
 
Back
Top