Play music when player dies

0 favourites
  • 10 posts
From the Asset Store
Customize the animation of character when item changed
  • Hi.

    I want a little music to play when the player dies.

    This is what it looks like in the layout:

    <img src="http://4.bp.blogspot.com/-Ya0QFdmMI74/UcnNnuFleLI/AAAAAAAAAAo/4r_-ptPhwo4/s1600/errrror.png" border="0">

    And This (the doughtnut video) is what the music sounds like when played with VLC player, followed by how it sounds when activated in the game. See how distorted it sounds? Like it's playing it 6 or 7 times all out of sync.

    Any ideas as to what's going on?

    Thanks!

  • use a System Trigger once while true

  • don't do "stop" it wil lstop the sound as soon as it started.

  • thanks folks!

    I'll use a system trigger and fix the 'stop'.

  • Yep, that did it. (I don't understand the mechanism by which it worked- but if it works, it works, right?)

    Thank you

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The Stopping of sound "b" shouldn't have been a problem. It was seeing that Y>LayoutHeight over and over every tick, and playing the sound many times.

    Telling it to only trigger this event once while y>LayoutHieght will cause it to only play once.

  • Ah! I see. Thank you, that's going to be handy to know.

  • I use that when I suspect an event is firing too many times. I put a click sound in there, and I know to fix it, if it sounds like a motorboat.

  • Hi. When I try to use multiple audio actions it does not seem to work well.

    I tried different setups:

    <img src="http://www.fotos-hochladen.net/uploads/soundproblemvxnkdrqyga.jpg" border="0" />

    1. Stop BG, play FX once, Start Bossmusic (in different orders)

    2. Tried wait to add it after a delay

    3. tried it with a new condition

    But the Bossmusic does not start to play. I tried it with and without tag. Does anyone know how to fix this?

  • When I add Audio.Preload on the Title screen (the layout before the game layout) it seems to work and additional music files are played. The main music started on "On start of Layout" is not preloaded but played/streamed properly.

    I thought preloading just works for sounds (some effects are not played until 6-10 seconds gameplay have passed when no preload was added) but it seems it works well for music, too.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)