- Messages
- 187
- Country

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