How to add idle, mid, max, engine sounds to flying pawn?

I have three wav files,
idle thrust sound.wav
running thrust sound.wav
max thrust.wav

I have a custom mesh as a flying craft,

i did all that by following a tutorial here:


don’t know much about blueprints but in this video tutorial the guy shows what I want except it’s for a car, and not for a flying craft, but it’s in russian lol

Basically, you will need:

+) Add an Audio component to your flying craft blueprint.
+) Add 3 audio cue variable to hold the file path to your sound option.
+) A variable to know which state your flying craft are in(idle, mid, max)

Then based on the state variable, you get the suitable audio cue variable and assign it to the audio component’s audio cue.

Thank you very much for your help, I was hoping for a picture example of how it would look in the blueprint or , I’ve added the audio component to my flying ship, i’ve added the wav files in unreal engine, I know how to attach single sound to the aircraft but that’s as far as i got without watching or seeing someone else do it,

again thank you for those pointers,

Well, right now I can’t use unreal engine so I can’t give you a picture example. Either you have to wait for someone else to do it, or until I get home in 7 more hours =w=

I see, no problem, i’ve got other stuff to do too, waiting is no big deal, please do post an example when you can, looking forward to it.

i’ll be back here to check after 7 or or eight hours,

see ya

Hello mate,

Sorry for the delay. Anyway, first you need to set up 3 sound cue variable, and make sure you assign the correct sound cue to each variable default value, idle sound cue to idleSoundCue variable,… Then next you need to add 1 audio component your blueprint. Finally, set up a function that update your engine sound based on your speed, which can either be a float value or enum,…

Awesome! About to try all this and let you know how it works later,

OK I copied everything precisely but no sound, i get nothing for audio,
here is how my setup looks like

video of actual game running in editor, maybe it’ll help

When did you call Update engine audio function? That function need to be call whenever you update your speed. At the moment, you can tried to drag it out in Event graph and connect it to begin play node.

like this?

nope, no sound, maybe looking again at that tutorial for space ship physics sim might help?

that's exactly how i made my blueprint,

thanks guys, will do some reading then

ok i got this far Imgur: The magic of the Internet
now how to add speed of spaceship to that and make it give different sounds, idle, mid, max etc

for the left and right engines

Yep, did it work?

You need a cue with a “Crossfade by param” node. Add one input for each available sound.
Then in an actor with an AudioComponent: 1) set the audio component to use your cue, 2) On the tick event call “Set Float Parameter” to your component.

Reference:

Well, I will look into it when I get back home. Until then, let us just leave it just like that, thankfully it is not gonna get in the way of your other work

Related discussion about “Crossfade by param”: How does the Crossfade by Param node work? - Audio - Unreal Engine Forums

Also it seems AdvancedVehicle project template is using this solution so definitely check it out.

There is sound now, yay!

like you said I just have to mess with the settings, but the engine power variable is set to 80,000 should I use that as a base for the values for crossfade in/out?

  1. Correct the fade in/out values, they are currently all zero. Volume must be close to 1.

  2. The sound result will change depending on the settings and the value:

253960-pin.png

You need to connect it e.g. with the current thrust or speed.

Exactly, these values are relative to what you provide from the blueprint with the “Set float parameter”.