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

FSX Stopping a Play Sound Action

Messages
315
Country
us-virginia
I've done the due diligence forum searches with zero hits - firts time that ha happened :yikes:
Anybody know how—or if it's possible—to stop a Play Sound Action "mid career" as it were.

The situation: I start a siren triggered by a timer trigger. It is tied to the engine start of an airplane. If you don't take off within a certain time frame (the timer trigger) the siren starts. It is located at the airfield so "can be heard" as long as the aircraft is on the ground…that's the idea. It stops after about 30 seconds.

The issue is when the plane is taking off—just after liftoff—one really would not hear the siren. If you are fast enough with the taxi and takeoff—the whole idea—the siren might start halfway down the runway, which is OK. However the siren plays the whole 30 seconds—far past where someone in the aircraft could hear it.…yet is still heard in the cockpit.

Since it is an action, an ActivateNode Action set to FALSE is an invalid option. I don't see anything else that would work … what am I missing here? :confused:
 
I see this is old but to assist others my I give a suggestion.
Use a New SimMission.PropertyTrigger
QUOTE: I start a siren triggered by a timer trigger. It is tied to the engine start of an airplane. If you don't take off within a certain time frame (the timer trigger) the siren starts. It is located at the airfield so "can be heard" as long as the aircraft is on the ground…that's the idea. It stops after about 30 seconds. ENDQUOTE
Tie the Timer and sound (using the Action box of the New SimMission.PropertyTrigger) to the New SimMission.PropertyTrigger and set the New SimMission.PropertyTrigger to stop the sound and timer when the aircraft is at or above a specified speed, altitude or what ever works for you.
There a many Properties you can use in a New SimMission.PropertyTrigger.

There are other ways to do this but this worked for me.
*hugs*
 
Ah yes…a most excellent idea. I see how that would work…I could even substitute a fading away version of the siren. Thanks.

Unfortunately, I had to move on with the project so the sound in the cockpit remains. That said, in testing I found that under normal circumstances, unless you use Ctrl E to start the jet, the start up and taxi take just long enough so that on takeoff the jet is just passing by (or trying to takeoff over) the police car as the 30 seconds ends and goes silent. (there is a clip that shows it in this Promo Video )

Again, thanks for the solution, I'm sure I'll have need for it in the future.
 
Actually there's an even better solution to this: use a playlist.
There are 4 different ways of playing sounds within a mission:
- dialog action
- oneshot sound action
- playlist action
- activate an effect with sound
Only one of those 4 ways allows to stop the sound whenever you want, that's the playlist action - the other 3 sounds play at least until the end of the soundfile.
The playlist action works like a CD or rather mp3 player: when you call the next item on the list it jumps to that next sound file and stops the previous soundfile.
If you want to stop a sound without playing a new one just create a dummy sound file (a small empty mp3). As soon as you call this dummy playlist action the previous playlist action stops.
We made plenty of use of this technique in some of the Flight Tales II - ADRENALINE missions, it works quite well.
 
Ah - very good. Thank you. That would have been what I wanted to do.

For background, we are talking about a mission in the simNovel Pilate's Ghost.

Spoilers Alert: You, as one of the novel's protagonists, must steal an Airbus (default FSX model). The police are alerted by the sound of the engines starting up (a simple property trigger that starts a timer trigger) and rush to the runway to block your attempt to takeoff. I used the one shot sound action with a european siren sound, and using a fade in so that it gradually gets louder as the police car gets closer to the runway. I have the default police car drive a path that ends blocking the runway about half way down where the sound stops after a few seconds. Can you takeoff before the police car gets there? Or can you takeoff over the police car? (Both are possible although the latter is a bit sporty)

d2ac07.jpg

End Spoilers alert

The initial fade in matches pretty well - giving the impression of the siren getting louder as the police car gets closer. Additionally, the siren stops at or just after the jet passes the police car (or smacks into it). Not perfect but pretty darn close. This was achieved through many, many tests to get the initial timer trigger set just right. However, it only works if the user actually goes through the start up procedure - even if they go through it fast, it will work out about right.

The issue is a Ctrl E start. If the user does that, they will be down the runway and several hundred feet in the air before the sound stops. In that case you hear the police siren, loudly, through all the jet noise, wind noise and a mile or so away. The story itself, the flight notes and the mission brief ALL speak to gong through the start up procedure so…

So what I wanted was a Playlist with two sounds - the siren and a minute or so of silence. The trigger to switch would be a proximity trigger with the area set at the center of the runway. Even better would be a short fade out sound of the siren…with a doppler shift…again triggered as the plane passes the through the area.

There will be other simNovels - thanks!
 
Very nice.
I guess that police car includes effects for the red and blue lights? If so you can add the siren sound to that effect and don't worry about fade in or fade out. As the object approaches the user FSX automatically fades in its sound depending on position and distance to the user.
 
Yes the blue/red lights are flashing…and I see what you mean about adding a sound effect to it. I have done that on a personal scenery project - added turboprop noise to a static but props turning E-2C by attaching it to the red aircraft beacon light. That would have worked perfectly…and already knew how to do it.

They do not seem to have an emoticon of a forehead slap…so I will use this :oops: <sigh>

Next time…next time…

Thanks - in this case there were many wrong answers (like the one I went with), several good answers, but this would have been the best answer. :)
 
Back
Top