[Resolved] How to fire off sound effects after a certain number of bricks are left

I can get a nice array to select the sounds randomly and play them every update, but cannot seem to get the info off the Brick class (probably because it gets destroyed) to set up a way to play random sounds after so many bricks are removed.

Any idea what I might do to set a trigger up so that a sound effect is played after X number of bricks are destroyed?

I killed all my code, so I have no examples. I was thinking this has something to do with using LevelManager as a way to keep track of broken bricks. But its class doesn’t return any information like that. Not that I can tell, anyway.

Hello @Yithpistol,

Not sure if you have resolved this or not yet? Let us know, it’s been a little while, if not I will give you a hand :slight_smile:

I need to go back and figure it out, now that I’ve got some better C# and unity chops. I’ll go ahead and mark it as resolved, and if I can’t figure it out I will open a new discussion and paste details like code and such. Thanks for the reminder.


No problem at all :slight_smile:

Privacy & Terms