plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

PuffinFlight avatar image
PuffinFlight asked FlyingRaccoon edited

Sound for static simobject?

Hi.
I can't figure out how to add sound to static simobject. I've tried to add fake animation and attach sound to animation, but it didn't work. I've tried custom simvars (Z:), nothing. Is there any way to add sound to static simobject, or maybe someone have an example of it?

scenerysound
4 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Hello @PuffinFlight


Can you show us the content of your sound.xml file?

Regards,
Sylvain

0 Likes 0 ·

I don't have it anymore as I've tried many ways and had to release my fireworks without sound but it was something like this:

  
                     
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <SoundInfo SimVersion="1.0">
  3.  
  4. <WwisePackages>
  5. <MainPackage Name="PuF_Fireworks_ai"/>
  6. </WwisePackages>
  7.  
  8. <AnimationSounds>
  9. <Sound WwiseData="true" ViewPoint="All" WwiseEvent="StartFireworks" />
  10. </AnimationSounds>
  11.  
  12. <SimVarSounds>
  13. <Sound WwiseData="true" WwiseEvent="StartFireworks" FadeOutType="2" FadeOutTime="1" Units="BOOL">
  14. <Range LowerBound="1" />
  15. </Sound>
  16. </SimVarSound>
  17. </SoundInfo>

Because I have no idea if my soundbank is prepared as it should be I've tried with the soundbanks from the sim, by copying the aircraft soundbank and trying to trigger it but with no success.

0 Likes 0 ·
The xml seems ok.

Your wwise event is named Play_PuF_Fireworks_ai_StartFireworks, right ?
You're not the first one to struggle with sound on static objects. I'll run my own tests when I find some time.

Regards,
Sylvain

0 Likes 0 ·
Show more comments

1 Answer

·
FlyingRaccoon avatar image
FlyingRaccoon answered FlyingRaccoon edited

Hello @PuffinFlight

Your <Sound> section needs the Simvar attribute to be set when using <SimVarSounds>
https://docs.flightsimulator.com/html/Content_Configuration/Sounds/Sound_Definitions.htm?rhhlterm=Simvarsound#h15

Can you check that?

Regarding your AnimationSounds, what is your model.xml looking like?

Regards,
Sylvain

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.