Jump to content
Sign in to follow this  
Guest knivpekka

Multiple smoke systems in FSX

Recommended Posts

Guest knivpekka

This may be old stuff to most of you people but for me it was definitely an epiphany:I just discovered that it is possible to control multiple smoke effects (smoke.0, smoke1, etc) independently by parsing a number to the SMOKE_ON variable. According to the SDK this variable is a boolean, but that is obviously untrue:

1 (>K:SMOKE_ON)  <!-- enable smoke.0 -->2 (>K:SMOKE_ON)  <!-- enable smoke.1 -->0 (>K:SMOKE_ON)  <!-- enable all smokes -->1 (>K:SMOKE_OFF)  <!-- disable smoke.0 -->2 (>K:SMOKE_OFF)  <!-- disable smoke.1 -->0 (>K:SMOKE_OFF)  <!-- disable all smokes -->

...and so on. The nifty thing about this is of course that it can be used to trigger any fx, not just smoke. /Tom

Share this post


Link to post
Share on other sites

Well, that is indeed quite interesting! I'll have to try it myself soon... :(


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
This may be old stuff to most of you people but for me it was definitely an epiphany:I just discovered that it is possible to control multiple smoke effects (smoke.0, smoke1, etc) independently by parsing a number to the SMOKE_ON variable. According to the SDK this variable is a boolean, but that is obviously untrue:
1 (>K:SMOKE_ON)  <!-- enable smoke.0 -->2 (>K:SMOKE_ON)  <!-- enable smoke.1 -->0 (>K:SMOKE_ON)  <!-- enable all smokes -->1 (>K:SMOKE_OFF)  <!-- disable smoke.0 -->2 (>K:SMOKE_OFF)  <!-- disable smoke.1 -->0 (>K:SMOKE_OFF)  <!-- disable all smokes -->

...and so on. The nifty thing about this is of course that it can be used to trigger any fx, not just smoke. /Tom

Oops ... If that is really true, what happens if you don't specify a number ?? (so just the event, like in FS9 )Does that mean that the event just picks an undefined value from the stack (so effectively an arbitrary value that happens to be the last stack value) ??Definitely would make FS9 code incompatible with FSX code using this event ...Rob

Share this post


Link to post
Share on other sites
Guest knivpekka

Initializing the event without a value should have set the boolean to TRUE, but that didn't work as the type is evidently not BOOL but ENUM. That's what got my attention in the first place, since my smoke trigger function worked perfectly well in FS9 but not so in FSX. I had two smoke systems, and putting 1 in the SMOKE_ON var only triggered the smoke.0 effect, not smoke.1. So I tried sending 0, and hey presto, both of them came on. For the hell of it, I tried 2, and now only smoke.1 worked... Then I stayed up all night. :( (Maybe this will help with the dusk/dawn "plasma" problem from light triggered fx, using smoke events instead?)BTW I haven't tried this out in FS9 yet but my guess is it won't work.

Share this post


Link to post
Share on other sites

Smoke will only work if one engine is started...Still, it may be useful to have 'additional lighting' available even with this limitation.I had hoped to be able to control multiple "vclights" to simulate individual overhead reading/spot lights. :(


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest knivpekka
Unfortunately, this will only work for a/c that're off the ground...The "smoke system" is inhibited unless airborne...
Sorry Bill but that is not quite correct, this works perfectly well on the ground. At least one engine must be started (combustion=true) for smoke fx to work though. :(

Share this post


Link to post
Share on other sites
Sorry Bill but that is not quite correct, this works perfectly well on the ground. At least one engine must be started (combustion=true) for smoke fx to work though. :(
I can confirm this with what I tested.With all engines Off, the Smokesystem function in FSX still works (that is: the toggle/On/Off event still works, and the On/Off variable still indicates the current On/Off position), but the effects coupled to the Smokesystem are disabled.Yet another example of a subtill (and undocumented *sigh*) change from FS9 to FSX (why changes in such a detail anyway ???)Especially since the original implementation of the Smokesystem (since FS4 ??) had nothing to do with engines or engine smoke, but was created for the "spray-effect" of a cropduster aircraft .....Cheers, Rob

Share this post


Link to post
Share on other sites
Sorry Bill but that is not quite correct, this works perfectly well on the ground. At least one engine must be started (combustion=true) for smoke fx to work though. :(
As I discovered myself after posting that. Even so, it makes it fairly useless for controlling multiple interior lighting...All XML variables are FLOAT64 type anyway, despite the various "unit" labels of bool, number, string. The XML parsing engine uses these "unit" labels as a flag to pre-format the XML variable for consumption/display by the gauge engine.I suspect that internally the actual value is using "bit flags" to decode which of the smoke.n entries to enable/disable.It's interesting that the actual bit being set is indexed according to the smoke.n are listed. For example, in a test gauge I scripted, passing 1 (>K:SMOKE_ON) will control the smoke.1 entry, provided there was no smoke.0 entry...Now I wonder what the limit is on the number of entries in the [smokesystem], and if .fx lights from there "count" towards the maximum number allowed by the [lights] section...

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest knivpekka

smoke.98 seems to be the limit regardless of the number of lights.n in the lights section. (I actually built a "Close Encounters" sort of contraption with 100 nav lights in various colors to test this out... ) 090401_002.jpgThis is FSXA btw, haven't tested this anywhere else.

Share this post


Link to post
Share on other sites

Too bloody cool! :(


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Why not simply post it here for all to locate with a simple search? :(


Ed Wilson

Mindstar Aviation
My Playland - I69

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...