Announcement

Collapse
No announcement yet.

Sound won't stop when keys are released?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    The second bool being set to true causes problems, but if that doesnt work, hmm.

    Is there a reason why you have the sound set on "stop" at release? If anything, the sound will be permanently stopped via doing this, and will not play again once you start pressing buttons again. Using only the "pause" will allow the sound to continue to play from the paused position when conditions are ok again. To play after stop you need to set "play sound" again after every stop to get it back working, as now the play sound is only at begin play.

    Is the sound file set to loop? With pause, it should pause playing nevertheless though, but without loop will play only once and not at each button press.

    Now the sound should play when any button is pressed, if you release "s" for example, the sound will still play if you have one other button down. But thats intentional I assume, making the player make noices whenever it moves.

    Leave a comment:


  • replied
    Originally posted by Muntrax View Post
    The "another key pressed" bool is set to true on both pressed and released. Should it not be set to false if released?
    I noticed that and changed it but its still the same issue.

    Leave a comment:


  • replied
    The "another key pressed" bool is set to true on both pressed and released. Should it not be set to false if released?

    Leave a comment:


  • started a topic Sound won't stop when keys are released?

    Sound won't stop when keys are released?

    So i have my visual blueprint for footsteps, I had it at one point where it would play the sound when pressing a key and stop when i released it. However, when I pressed 2 keys simultaneously and let go of 1 key but keep the other pressed the sound would stop. So I eventually came up with the branching idea and created a variable for when another key is pressed.

    Now when I press any of the keys the sound just plays and doesnt stop, even when any key has been released. I've tried many ways to solve this with no avail.

    any help?
Working...
X