How to set up an Integer for a Sound Cue Switch Node?

Hi, I’m trying to set up a Sound Cue with a Switch node that is driven by an integer value from the My Character Blueprint.

I’m trying to set up a system that plays footstep sounds based on the type of surface my character is on. The sounds are triggered from Animation notifies (on the walk and run animations).

How can I use an integer to control the Switch node in a Sound Cue?

Thank you!

Thanks, how could I set this up in a blueprint?

Functions to control cue parameters are in Audio Component

https://docs.unrealengine.com/latest/INT/API/RuntimeModules/Engine/Components/UAudioComponent/SetIntParameter/index.html

just use go to “Components” ■■■ Audio Component and then in blueprint you should have variable created with that component instance, use it to set soundscue inside it with Set Sound

https://docs.unrealengine.com/latest/INT/API/RuntimeModules/Engine/Components/UAudioComponent/SetSound/index.html

and then use Set Int Parameter to set parameter in cue

You forgot to set sound

I’m sorry but I don’t understand. What do you mean I forgot to add sounds in the audio component?

I think I see what you’re getting at. Could you please show me what you mean?
Just for context, I have the sounds set up in the footsteps sound cue because that cue is being triggered by event notify’s by the walk and run animations.
Here’s my audio component properties, am I doing something wrong?

Are you asking me to add sounds to play in the graph? Wouldn’t that defeat the purpose of triggering sounds from my animation?

Sorry, perhaps I wasn’t very clear about my end goal. Currently I have notify’s set up in my animations to play the footstep sound cue. I’ve added the switch in the sound cue and would like to control the integer required for the switch from my character blueprint. How can I do this?

Audio Component it self is useless, you ned to set sound in it and play that sound in it :slight_smile:

Ok it seems got sound set :> Do you play sound from Component with play function?

Then make your animation play sound in audio component, as audio component seems to be only way to set those parameters

Ahh ok I’ll look into this. I’m confused though because according to the documentation the Switch node in an audio cue is driven by an integer. Is there no way to get an integer to control the switch node?

You need to set that parameter each time the ground changes

…with Set Int Parameter? you already doing that

Ok let me clear something out, what you expect from “Set Int Parameter”?
That you gonna set integer varable in it and then when you change that varbale it will automaticly apply? if yes that does not how it works, you need to do this set on every time oyu want to change that paameter. IF not then make sure you using right audio component right sound cue and right parameter name.

Yes, but how do I set the parameter? Could you please show me an example?

It doesn’t work.

If you were to implement such a system, how would your graphs look? Have you gotten this to work?