• 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 Sensing sounds or effects

Messages
187
Country
us-california
This query could probably "fit" into a number of sub-forums since it relates to sound, effects and gauges but I thought this would be the "best fit".

Is there a way in FSX to determine when a "wav" file is being
played or an effect "fx" file is active?

An explanation of my desired use:

What I am attempting to do is recognize when the user
aircraft is within range of some FLAK explosion effects
so that I can use that information eo effect damage to
the aircraft without the user having to do anything
other than enable the possibility of getting damaged.

At the moment the only solution I have for this is to
create "dummy" DME stations with very short ranges and
locate them in the FLAK areas. I have an XML gauge that
sets the standby NAV2 freq to 117.95 and if the user
tunes the active NAV 2 to 117.95 the "Flak Damage Code"
is enabled in the XML gauge code. Once in range of the
DME I sense the signal strength, and if above a threshold
level, consult a couple of random number generators to
determine if damage is to be inflicted and the type of damage.

This is rather a kluge in that the "dummy DME" sites
clutter up the landscape, as I have several hundred
FLAK sites spread around Europe (I started this little
project with the A2A Accu-sim B-17G in mind)

I was hoping to use a method that was less of a kluge
and since the effect files and controllers with the WAV
file references were already located where I want them,
sensing the sound being played would be ideal.

Another approach, albeit very messy, would be to do a
Lat/Lon compare but there are just too many sites that
I would have to create tables of Lat/Lon rectangular areas
for and continuously compare the current user aircraft lat/lon
with those hundreds of table entries.

The one "interface" between the user aircraft and external
effects, "cause damage", was removed by Microsoft for FSX
as I understand it.

What I wish to do is perhaps possible via SimConnect but
I have no experience writing code for that application
so Lua and XML were my choices.

In addition to the above "damage determination" I also
wish to inject turbulance, possibly using thermals, when
the aircraft is within the flak. I've experimented with
that using XML weather code compiled to BGL's but that
is a tedious process. Pushing variables in through
FSUIPC may be a better solution once I have a "clean"
method of sensing the position conditions.

Any ideas, help, solutions would be greatly appreciated.

Paul
 
sound effects

Hi Gypsy Baron ,

I have created a sound effect for past projects. basically you can
have the sound only heard from a distance set.

If you install sp1A for FSX you will be able to use the sdk developers programs. I am sure you know this. But some don't understand SP1A.

This goes: <Drive>:\Documents and Settings\<alias>\Application Data\Microsoft\FSX folder should contain the following bold lines (if the dll.xml file already exists in this folder), or the dll.xml file should contain all the following (if the dll.xml file does not already exist at the right location).

<?xml version="1.0" encoding="Windows-1252"?>

<SimBase.Document Type="Launch" version="1,0">
<Descr>Launch</Descr>
<Filename>dll.xml</Filename>
<Disabled>False</Disabled>
<ManualLoad>False</ManualLoad>

<Launch.Addon>
<Name>Special Effects Tool </Name>
<Disabled>False</Disabled>
<Path>..\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Special Effects SDK\visualfxtool.dll</Path>
</Launch.Addon>

</SimBase.Document>


Now your visual tool will show up in your game menu.
You can create a very large area too.

Hope this helps.

DG:eek:
 
Hi Gypsy Baron ,

I have created a sound effect for past projects. basically you can
have the sound only heard from a distance set.

If you install sp1A for FSX you will be able to use the sdk developers programs. I am sure you know this. But some don't understand SP1A.

This goes: <Drive>:\Documents and Settings\<alias>\Application Data\Microsoft\FSX folder should contain the following bold lines (if the dll.xml file already exists in this folder), or the dll.xml file should contain all the following (if the dll.xml file does not already exist at the right location).




Now your visual tool will show up in your game menu.
You can create a very large area too.

Hope this helps.

DG:eek:

Thanks for the reply. However, I have the Object Placement Tool and
Special Effects Tool installed and have already placed my effects with sound.
Thousands of "Cntrl_Flak.fx" controllers throughout the European landscape
which generate flak bursts over hundreds of cities and facilities from
4or 5K up to 30K altitudes.

My problem is that I would like to sense when the user aircraft is within
one of the "flak areas". That is, when the flak is bursting around the aircraft
and the explosion sounds are being played.

It is then that I want to programmatically determine if damage is to be applied
to the user aircraft.

I have been through all the SDK's for FSX, FSUIPC and the Lua facilities
but can not find any method to know when an effect or sound in the scenery realm
is active so that a gauge can act on the presence of the activity.

There used to be parameters in the effects file that were labeled
Damage, HitPoints, Magnitude, Time, and Range that may have
made possible what I am wanting to do, have the effect interact with
the user aircraft. But these are no longer available.

If anyone has a XML code template for comparing the user aircraft
lat/lon with a (long) list of lat_min,lon_min,lat_max,lon_max data
sets, that would be a possible approach.

Paul
 
Hi baron,

I recently read that these only can be used for combat fight simulator.

DG:)

Yes, I knew that those parameters (Damage, HitPoints, etc) were not
usable in FSX. What I would like to be able to do is sense when a particular effect has been triggered or, barring that, when a sound file
played as a result of the effect being triggered is active.

Paul
 
Back
Top