What condition can solve the problem with looping sound reproduction?

  • What condition can solve the problem with looping sound reproduction?

    If the player is in the field of view of the camera - the alarm is activated.

    The problem is that if a player repeatedly gets into the camera's view, the music is turned on and on. Even the use of a variable does not save.

    It should be. No matter how many times a player gets under the camera's vision, the music starts once and plays all the time.

  • trigger once while true (this will trigger once for the instance of the object, if there are more it will trigger for each and every one of them), or global variable, set can play to 0 and if played set it to 1 if user goes in screen and canplay=0 set 1 play song, if is =1 doesn't play.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • trigger once while true (this will trigger once for the instance of the object, if there are more it will trigger for each and every one of them), or global variable, set can play to 0 and if played set it to 1 if user goes in screen and canplay=0 set 1 play song, if is =1 doesn't play.

    Yes, it worked, needed a global variable. Thank!

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