how to change sound cue(music) when player attack?
Cant find anything about changing sound cues on spesific situations? Can someone help me please?
asked Aug 18 '17 at 10:10 AM in Blueprint Scripting
If you want to change the music inside the sound cue one option would be to use the branch node. For example you could have two Wave Players, one with your Attack Music and the other one with your normal music. Name the branch node whatever you like, e.g 'AttackMusic', and if it is set to true then play the AttackMusic, and if it is false play your normal music.
From your level BP you can create a reference to your sound cue then drag off of it and select the 'Set Boolean Parameter' whenever you want to switch to your Attack Music. In the 'name' section of the node you write whatever it is you called your branch in the sound cue, in this example it was 'AttackMusic', and then check the bool box to true.
Similarly when you want to switch back you would do the same thing but make sure the bool box was set to false.
Below I have a sound cue called 'Jompson' with two Wave Players and a branch called AttackMusic. In my level BP, whenever I press the G key, the boolean branch in the sound cue will be set to true and will play 'Starter_Birds', when I press the H key it will be set to false and play 'Starter_Music'.
Does this help? :)
answered Aug 18 '17 at 09:38 PM
How is the player attack being called? If you put sound cues in your level then from the level blueprint, depending where/how you're calling the player attack, you could tell it to stop playing the current sound cue and then play the new sound cue.
answered Aug 18 '17 at 02:05 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here