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

P3D v2 Sound with attachpoint not working?

mskhan1991

Resource contributor
Messages
910
Country
pakistan
I attached a sound with my frigate for my upcoming alouette project.

The problem is I can't hear the sound ... here's my code:

Code:
[Library Effect]
Lifetime=5
Version=2.00
Display Name=type21 sound
Radius=200
Priority=0
[Sound]
Looping=TRUE
MinAttenuationDistance=300
FileName=MSK T-21 sound.wav
 
Hi.

I think the sim might not like spaces in the filename

FileName=MSK T-21 sound.wav

Dick
 
All I want to do is attach sound to a simobject using attachpt tool..... a sound that runs 24/7 and loops .... and want to hear it around 300-500 meters from the origin.....

My current complete code.... is it correct?


Code:
[Library Effect]

Lifetime=5
Version=2.00
Radius=300
Priority=0
   
[Sound]
FileName=MSK_T-21_sound
MinAttenuationDistance=500.00
Looping=TRUE

[Properties]
Spot=1
Tower=1
 
Hello:

I'm not sure yet whether Lockheed-Martin has changed how the SDK works with the Special Effects coding for sound, particularly when implemented via an AttachPoint on the revised P3D *.MDL format.

If by any chance it still works as it did for FSX, you might wish to review this thread for some example code structures and related info:

http://www.fsdeveloper.com/forum/threads/sound-effects.424400/


IIRC, in examples posted thus far, one normally does not also specify the *.WAV file "extension" for the sound file "name" ...unless one is listing an explicit path to a sound file physically located outside the FSX default 'system' sub-folder for sounds at:

[FSX install path]\Sound


And of course, if you do intend to play a sound file without listing an "explicit path" to a sound file physically located outside the FSX default 'system' sub-folder, a copy of the desired sound file must be placed into [FSX install path]\Sound ...in order for the FSX Effect engine to "find" and "play" it. :pushpin:


Hope this helps ! :)

GaryGB
 
Last edited:
Thanks.

I don't know why but I added emitter.0 section from fx_explosion.fx and changed the lifetime to 99999 and its working now .. hmmm
 
Thanks.... but if instead of changing lifetime=9999 to lifetime=0.00 .... will it work throughout?

Hello again:

I'm unfamiliar with use of "9999" as a parameter value in *.Fx files for anything related to "sound" (only seen used for Drag and/or Temperature).

I'd recommend testing using the commonly seen values of "x.xx", rather than "9999" as shown in the worked examples linked above.


FYI: FSX constantly loads and then promptly unloads *.WAV files from the Windows FS task session UserVAS when a sound-playing Effect is triggered and played.

Such recurrent file I/O is particularly adverse to performance in FSX, so IMHO, one would wish to trigger the Effect to begin playing the sound only when the user aircraft / SimObject / camera is inside the trigger radius.


The Effect *.Fx code should also be written so that the sound attenuates and eventually stops entirely after the user aircraft / SimObject / camera is outside the trigger radius.


PS: You may wish to review some of the other detailed info and linked example files involving use of FS Effects to play sounds in this thread:

http://www.fsdeveloper.com/forum/threads/do-you-know-how-to-add-custom-audio-at-your-airport.19020/


Note: In the thread linked immediately above, see especially the linked early FSX add-on package of freeware examples created by Joe Watson for Plum Island (ICAO 2B2) which works with both Bill Womack's excellent payware airport and area scenery package published by FS-Addon, as well as the FSX default airport.

http://secure.simmarket.com/fsaddon-plum-island-for-fsx.phtml


Hope this helps a bit more ! :)

GaryGB
 
Last edited:
Back
Top