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

What Triggers FX?

Messages
90
Country
us-newyork
Hi. I'm trying to make a flare go off in FSX when I fly by it. (SAR Mission) So far, it goes off immediately when I load the flight...and that's it, never again! So by the time I fly to it, it's already been triggered way before.
How can I trigger the flare to only go off when I'm a certain distance from it?

Thanks.
 
Last edited:
You need to set up a Controller file that controls when the effect is triggered.



Controller File Properties

The following table lists the properties of the effects file used by the controller.



Effects file section or propertyDescription
[Library Effect]
Lifetime=5
Version=1.00
Radius=200
Priority=0
The parameters in the [Library Effect] section are the same as for a regular effects file.
[controller.0]
The controller number. You can spawn multiple controllers: [controller.1], [controller.2], and so on.
Lifetime=0.00, 0.00The length of time that the controller exists and emits effects. A [Lifetime] parameter value of 0.00 creates a controller that has an infinite lifetime. If a controller has an infinite lifetime, the effects engine continues to step through the list of effects until the scenery engine shuts off the controller. A short lifetime can mean that the controller steps through the list of effects only once or twice.
Type=0
The [Type] parameter determines how the controller steps through the list of effects.

There are four different types:
Type=0 is the Standard controller. The controller steps through each effect in the list sequentially.
Type=1 is the Random controller. This type works together with the [Random count] parameter described below. The controller takes the random count value that is generated and uses it to determine how many effects in the list to play. Each time through the list of effects, it selects a new random batch.
Type=2 is the Line controller. This type was used to create the waves (using vector data as lines). The line controller uses the X, Y, and Z Offset described below.
Type=3 is the Distance controller. This option works with the [Distance] parameter, which sets the distance at which this effect becomes visible or audible.
Delay=0.00, 0.00The time delay that occurs after the controller steps through all of the effects. (The effects are listed in the table below.) After the delay, the control steps through the effects again.
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Used with the Line controller. The sprites are generated this offset distance from the line in the X, Y, or Z direction.
Frequency=0.00, 0.00The [Frequency] parameter determines how many sprites appear along each section of line. If your lines (vector data) are of fairly even length, you can very accurately fill in along the line.
Random Count=0, 0The [Random Count] parameter picks a random value between the min/max values (in whole numbers) and then randomly chooses that number of effects to step through. (The effects are listed in the table below.) Use this parameter with the Random controller.
Distance=0
The [Distance] parameter tells the scenery engine how close you have to be before this effect is either visible or audible. You can use this parameter to create location specific sound effects. Use this parameter with the Distance controller.
Effects

The following table describes the effects that a controller triggers.



Effects file propertyDescription
effect.0=fx_launch, -10.00, 0.00, -10.00, 10.00, 0.00, 10.00, 0.00, 1.00The first effect in the list. The format is:
effect.#=effect name, X min, Y min, Z min, X max, Y max, Z max, delay min, delay max
effect.#=effect nameThe effect number and what effect (located in the effects folder) is to be played. You can also trigger another controller from here.
X min
The minimum offset value of the effect in the X direction. These are used to randomize (or specify exactly) the location of the effect when it is played.
Y minThe minimum offset value of the effect in the Y direction.
Z min
The minimum offset value of the effect in the Z direction.
X max
The maximum offset value of the effect in the X direction.
Y max
The maximum offset value of the effect in the Y direction.
Z max
The maximum offset value of the effect in the Z direction.
Delay min
Delay max
The minimum and maximum delays between when the effect is called (when the controller steps through it) and when it actually gets played. The delays are helpful because the controller steps through the effects list quickly (almost instantaneously), so if you want the effects to proceed in a slower sequence, use delays to augment trigger times.
 
Here is an example I wrote to trigger an effect file playing a WAV file: "This area is for loading and unloading only, no parking" next to the UAL entrance at my 1962 LAX.

This is a Controller file that fires the effect fx_parking_announce.fx when the user aircraft is within 61 ft of the effect location. It is named Ctrl_parking_announce.fx.

[Library Effect]
Lifetime=5
Version=1.00
Radius=61
Priority=0

[controller.0]

Lifetime=0.00, 0.00
Type=3
Delay=10.0, 10.0
distance=61,61
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
effect.0=fx_parking_announce, 0,0,0,0,0,0,0,0

You should be able to replace my effect with your flare, and set the distance and Radius values to suit you. Note this includes a 10 second delay until the effect plays again. That way the message repeats.

Hope this helps,
 
Last edited:
Here is an example I wrote to trigger an effect file playing a WAV file: "This area is for loading and unloading only, no parking" next to the UAL entrance at my 1962 LAX.

This is a Controller file that fires the effect fx_parking_announce.fx when the user aircraft is within 61 ft of the effect location. It is named Ctrl_parking_announce.fx.

[Library Effect]
Lifetime=5
Version=1.00
Radius=61
Priority=0

[controller.0]

Lifetime=0.00, 0.00
Type=3
Delay=10.0, 10.0
distance=61,61
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
effect.0=fx_parking_announce, 0,0,0,0,0,0,0,0

You should be able to replace my effect with your flare, and set the distance and Radius values to suit you. Note this includes a 10 second delay until the effect plays again. That way the message repeats.

Hope this helps,
I have been looking around since I want to have some chatter and music from a .Wav file within a Bush Trip. Can you give me a tip of how to get theis to work?.. Thanks
 
Here is what I know about playing sound files via an effect. I have no idea if there are other ways when in other than Free Flight, i.e. in a Mission. These are copied from previous forum threads - not my posting.

First you have a effects controller file. This controls where you must be located to hear the effect. This effect controller file must be placed into the scenery, at the locations you want to hear the sound. I placed one at each terminal at LAX. Second you have the effect file that actually plays the sound. This file is called by the controller file when specified.

ADE can place effects into the scenery, if you have used that program to create your Cape Canaveral airport (or you can load your AFCAD bgl file into ADE and use ADE from this point forward). If not, you can use XML and bglcomp to place them manually. This is not too hard.

The controller file (Cntl_parking_announce.fx), looks like this:

[Library Effect]
Lifetime=5
Version=1.00
Radius=61
Priority=0

[controller.0]

Lifetime=0.00, 0.00
Type=3
Delay=10.0, 10.0
distance=61,61
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
effect.0=fx_parking_announce, 0,0,0,0,0,0,0,0

So make a copy of my controller (in your FS2004/Effects folder) and paste it back in. Then rename it to something like Cntl_Canaveral_announce.fx.

The only line you must change is the last one, to point to your sound effect file, not mine. Just change the file name. You may also want to change the Radius=, distance=, and Delay= lines, if you want the trigger area to be larger/smaller, or the sound to start sooner/later (and the length of silence between announcement repeats).

So now we come to the sound effect file itself (fx_parking_announce.fx). The only important part of this file is at the top:

[Library Effect]
Lifetime=5
Version=2.00
Radius=0
Priority=0
Sound=5
Sound Param=31

[Properties]
Cockpit=1
VirtualCockpit=1
Spot=1
Tower=1
Map=1

The Emitter section below does nothing - it just makes it a valid effect file.

So make a copy of this file and rename the copy something like fx_Canaveral_announce.fx.

The important lines here are the Sound= and the Sound Param= lines. The Sound= line determines how the sound will be played (5 = play once; the controller repeats it). and the Sound Param= line determines which WAV file will be played. These WAV file names are all *hard coded* in FS and cannot be changed. There are a limited number of WAV file names and they cannot be used more than once in FS - you can use only one each in your entire FS9 installation.

The sound parameters and associate file names are:

----------------------------------------------------
Sound filenames associated with effects file entries
----------------------------------------------------

Sound type "5"

Where three filenames are listed, one will play at
random at each initiation of the effect...

----------------------------------------------------
FX file entry sound file(s)
----------------------------------------------------
Sound=5
Sound Param=0
firework.wav
----------------------------------------------------
Sound=5
Sound Param=3
xvlg_exp.wav
----------------------------------------------------
Sound=5
Sound Param=4
amb_aexp1a.wav
amb_aexp1b.wav
amb_aexp1c.wav
----------------------------------------------------
Sound=5
Sound Param=7
amb_aexp2a.wav
amb_aexp2b.wav
amb_aexp2c.wav
----------------------------------------------------
Sound=5
Sound Param=10
amb_aexp3a.wav
amb_aexp3b.wav
amb_aexp3c.wav
----------------------------------------------------
Sound=5
Sound Param=13
amb_aexp4a.wav
amb_aexp4b.wav
amb_aexp4c.wav
----------------------------------------------------
Sound=5
Sound Param=16
amb_wexp1a.wav
amb_wexp1b.wav
amb_wexp1c.wav
----------------------------------------------------
Sound=5
Sound Param=19
amb_wexp2a.wav
amb_wexp2b.wav
amb_wexp2c.wav
----------------------------------------------------
Sound=5
Sound Param=22
amb_wexp3a.wav
amb_wexp3b.wav
amb_wexp3c.wav
----------------------------------------------------
Sound=5
Sound Param=25
amb_wexp4a.wav
amb_wexp4b.wav
amb_wexp4c.wav
----------------------------------------------------
Sound=5
Sound Param=28
amb_gexp1a.wav
amb_gexp1b.wav
amb_gexp1c.wav
----------------------------------------------------
Sound=5
Sound Param=31
amb_gexp2a.wav
amb_gexp2b.wav
amb_gexp2c.wav
----------------------------------------------------
Sound=5
Sound Param=34
amb_gexp3a.wav
amb_gexp3b.wav
amb_gexp3c.wav
----------------------------------------------------
Sound=5
Sound Param=37
amb_gexp4a.wav
amb_gexp4b.wav
amb_gexp4c.wav
----------------------------------------------------

Sound type "6"

These sounds play at one of four different "speeds"
or "tones", chosen randomly each time by the Sim...

The filename listed will play at each initiation
of the effect, with four possible variations...

----------------------------------------------------
FX file entry sound file(s)
----------------------------------------------------
Sound=6
Sound Param=1
imp_large_a.wav
----------------------------------------------------
Sound=6
Sound Param=2
imp_large_b.wav
----------------------------------------------------
Sound=6
Sound Param=3
imp_large_c.wav
----------------------------------------------------
Sound=6
Sound Param=4
imp_large_d.wav
----------------------------------------------------
Sound=6
Sound Param=5
imp_large_e.wav
----------------------------------------------------
Sound=6
Sound Param=6
imp_med_a.wav
----------------------------------------------------
Sound=6
Sound Param=7
imp_med_b.wav
----------------------------------------------------
Sound=6
Sound Param=8
imp_med_c.wav
----------------------------------------------------
Sound=6
Sound Param=9
imp_med_d.wav
----------------------------------------------------
Sound=6
Sound Param=10
imp_med_e.wav
----------------------------------------------------
Sound=6
Sound Param=11
imp_small_a.wav
----------------------------------------------------
Sound=6
Sound Param=12
imp_small_b.wav
----------------------------------------------------
Sound=6
Sound Param=13
imp_small_c.wav
----------------------------------------------------
Sound=6
Sound Param=14
imp_small_d.wav
----------------------------------------------------
Sound=6
Sound Param=15
imp_small_e.wav
----------------------------------------------------
Sound=6
Sound Param=16
imp_small_f.wav
----------------------------------------------------
Sound=6
Sound Param=17
imp_small_g.wav
----------------------------------------------------


The Sound=5 sounds are for scenery, while I use the Sound=6 sounds for my AI sounds . So you'll need to use Sound=5. I've already used Sound Param=31, so you will need to use another one. BTW, you can have up to 3 different announcements - they will play randomly. I instead have 3 identical WAV files so the same announcement plays all the time. Look in your main FS2004 Sound folder and you will see amb_gexp2a.wav, amb_gexp2b.wav, and amb_gexp2c.wav. These are my parking announcements. Your wav files will go here too.

Other scenery creators have also used some sounds in their sceneries but I don't use non-CalClassic scenery, so that's not a problem for me. You can look in your Sound folder for any other WAV files starting with amb_ - avoid using those. They often used the lower Sound Param numbers, so that's why I used a large one (31). I would do the same and use a number like 34, if available on your machine.
 
Last edited:
Thanks Tom for responding. I haven't dove into FX files yet. I was just curious about the altitude parameters. I have been a long time fan of your work.
 
Your welcome, and thanks. I always assumed it was the distance from the aircraft, whether that is due to lateral or vertical displacement. But again, I've never checked it.
 
Back
Top