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.

In the upcoming flighting, we've changed the behaviour of the content.xml file. If your addon uses this file, please read this article!

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


question

NandoHer avatar image
NandoHer asked FlyingRaccoon commented

Triggering a sound event from regular code

Hi, we are wondering how we can trigger a Wwise event from a regular piece of code (not template, not animation related, no using simvars, etc).

It is possible?

sound
3 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.

Define a "regular piece of code": XML, JS, WASM?
1 Like 1 ·

We have found many examples of how to execute an event wwise, but all of them are linked with a button, switch, knob, etc. In this case we need to execute the wwise event when a set of conditions given by the state of the variables are met. Is it possible to do that?

0 Likes 0 ·
Yea as mentioned below SimVarSounds allows you to trigger a sound event based on the output of a SimVar or LVar
2 Likes 2 ·

1 Answer

·
FlyingRaccoon avatar image
FlyingRaccoon answered FlyingRaccoon commented

Hello @NandoHer and @gonzalofrv

You can use SimVarSounds for this and use your own local var

Sound Examples (flightsimulator.com)

Regards,
Sylvain

1 comment
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 @NandoHer and @gonzalofrv

I forgot about it but you also have the W event you can use in RPN code.
Reverse Polish Notation (flightsimulator.com)

You just have to call this event using the wwise event name and pass 0/1 to disable/enable it.

Regards,
Sylvain

1 Like 1 ·

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.