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

How to play a sound while an animation is running

Messages
33
Country
italy
I have defined the animation for opening a canopy (dragging an handle) and I’m trying to define a sound to be played while the animation is running but currently I’m only able to play a sound at the beginning and at the end of it using <WWISE_EVENT_1> and <WWISE_EVENT_2> tags inside the template call
 
I'm using this standard template ASOBO_GT_Lever_DraggingWheelLeftDrag_Axis to manage the animation
 
You should probably create a sound file that plays for the actual duration of the animation (however many seconds that is). You trigger the sound and then start the animation and the sound should be of enough duration to play until the animation stops.
 
Unfortunately with that drag template you can stop the dragging at any position of the animation therefore you cannot just leave the sound playing
 
Rather than giving a step-by-step advice I would suggest to open wwise and check the DA62 instrument sounds to see how it's done. There's some that use loops which can start/stop/continue as per user input.
 
Unfortunately with that drag template you can stop the dragging at any position of the animation therefore you cannot just leave the sound playing
Here is how I handle windscreen wipers. They can be stopped at any point (due to either user input or loss of power). Each cycle of the wipers retriggers the sound.

In the sound.xml in the SimVarSounds section:

Code:
    <Sound WwiseData="true" WwiseEvent="switch_wipers" Continuous="true" FadeOutType = "1" FadeOutTime = "0.1" NodeName="Glareshield" ViewPoint="Inside" LocalVar="sound_wipers" Units="Bool" Index="1">
      <Range LowerBound="0.5"/>
    </Sound>

Continuous will loop the sound until it is stopped.

LocalVar will start the sound when sound_wipers is set to 1. Range LowerBound will stop the sound when sound_wipers is 0. sound_wipers is set to 1 when the wipers are in motion and set to 0 when they stop (this includes when they reach the end of their sweep arc, it is then set to 1 again (after waiting one frame) to retrigger the sound to start again).

It is up to you to write the code that sets your own LocalVar trigger to know when the canopy is in motion or stopped.
 
Back
Top