Click button and play audio once

0 favourites
  • 3 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hi all,

    I am new to Construct 2 and made a button to play an audio.

    However, when I click the second time of the button, the audio plays but overlaps.

    Can I just play the audio once no matter how many time I click on the button?

    I tried "System > Trigger once" but not successful.

    Please kindly help! Thank you so much.

    Mike

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set up ether a global variable (if its across more then one layout) or a local variable.

    When the user click play set the variable to 1 or playing or something you can easily recognise

    Then you can set up the button will only work when the variable is equal to something you have chosen such as not_playing

    I'm presuming you know how long the song is, so to repeat this action again you could set up another event that after 60 seconds and the variable is equal to playing then set to not playing.

    Hope this helps

  • Hi hugothewhitewolf,

    Thank you very much. You are my star and I follow your concepts and made it.

    Attached an Event Sheet that may shorten development for somebody in the future :)

    flickr.com/photos/68746253@N07/8229794250

    Cheers,

    Mike

    P.S. Sorry that I cannot post URL as my REP is less that 500 :)

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