How do I create sound when all collectibles are collected?

0 favourites
  • 5 posts
From the Asset Store
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • In my game I added some collectibles and next thing I want to happen is when you collect them all the "winning" sound plays. There are 20 on the map and when player reaches to 20/20 it starts playing a win sound.

    How to write it on event sheet?

  • You can either have a global variable that adds 1 every time you collect an item. Then say when global variable is 20, play the sound. Or you can count how many items are in the level, which is items.count and set this to a variable, when the variable is 0 that means no items remaining and you can play the sound.

  • You can either have a global variable that adds 1 every time you collect an item. Then say when global variable is 20, play the sound. Or you can count how many items are in the level, which is items.count and set this to a variable, when the variable is 0 that means no items remaining and you can play the sound.

    I did that first option and when I collect 20 that sound plays endlessly even when I set "not looping". How to make it play only once?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add system > trigger once while true

  • Add system > trigger once while true

    Thanks man, now it works

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