Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
Sound end trigger
  • Hi.
    I want to trigger a new sound right after a sound has ended. How can I do that?
  • 9 Comments sorted by
  • @Mikkel we can add an onComplete trigger to the PlaySound action pretty easily and generate a new build. Are you a PRO user?
  • great! yes I am a PRO user.
  • Another thing. Mp3 music loops has loop issues with a break at the end. Can this also be fixed in the new build? 
  • @Mikkel if you are noticing a break in your loop it is most likely your audio file. GBs doesn't put a delay or break when looping an audio file it just auto replays. Make sure your file is loopable without a gap at the end. 
  • Can you also add a stop sound trigger as well in the next build?
    (When I press a button, I want to stop the sound looping in the background)
  • @Mikkel I'm pretty sure that has nothing to do with GBs. I've tested audio files on iOS that loop without any issues. You have to make sure your audio is loopable.

    To have a sound play and stop when you toggle a button use a custom Boolean property called soundOn (or whatever) and have a rules component trigger the play sound action if the value is true. Then toggle the Boolean property on mouse down using the Toggle action. This will stop the audio from playing when the Rule condition evaluates to false and stops the action. Make sure "Run To Completion" is not checked.
  • I tried this, but this method is not working. 

    Having issues stopping sound when changing levels when the sound is started by the Play Sound action trigger.
    However, when the sound is started by the SoundPlayer Component, the sound stops normally on level change.

  • @Mikkel this is a bug. It will be fixed in the next build. Your sound is suppose to stop playing when changing levels when turned on by Play Sound action. It doesn't currently. That is a bug. 

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion