When to play sound


  • Posts: 1
Hey, I'm new to Stencyl and am creating a tower defense game, and I want a walking sound effect to play whenever any Actors of a certain type are on the screen.   I can get a sound to play once when an actor enters the screen, but can't figure out how to get it to play continuously while any of that type of Actor is on the screen.  I've been playing around with Enters a Screen events, and trying to use loops to get more than a single instance of the sound, but nothing that I think should work does.  Can someone point me in the right direction?




  • Posts: 2070
I've approached a similar problem by always a sound effect looping and adjusting the volume. Let's say you have the sound looping on channel 30, you then check if an actor of that type is on screen. If yes, set the volume of channel 30 to 100%, if not, set the volume of the channel to 0%.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.