How do I end an audio when object is off screen

0 favourites
  • 5 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • But there are many of the same objects. Right now when the first one is off screen, the audio ends, which isn't right. I need when all of them are off (except for one that is on screen in a menu).

  • If you want to stop the audio when there is only one instance on-screen (the one in the menu) you could use:

    Is object on screen

    Is object.pickedCount <=1 | stop audio

    This first picks all the objects on screen then checks to see if the number of picked objects is one or less.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • they are alot tricks..

    use spite around the end off screen and when same object collide destroy or stop sound etc etc.this is one simple before go for more complex method.

  • Maybe if you destroy the objects off the screen at the beginning of the game, and create the objects on the screen, solve your problem ...

  • Thanks - this is what I did and it worked:

    If the object.Y didn't equal the object.Y in the menu, then (this is the one I want to test). Pick the nearest instance to the rightSide. If that object's X is less than or equal the leftSide then stop the audio.

    I never used the "pick nearest instance" before - so thanks for pointing me in the right direction!

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