How to continuously play a sound until redstone is turned off?

Started by TigerManGaming on

Topic category: Help with MCreator software

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to continuously play a sound until redstone is turned off?

My block is an alarm block. I want it to loop play a sound when a redstone power source is supplied, and stop playing that sound when the redstone power source is taken away. I've looked around but can't find an answer.

I'm having the same issue. I…
Wed, 01/08/2025 - 07:44

I'm having the same issue. I can't use a local variable to play the sound every time it finishes, because the "statement doesn't support local variables" apparently.

Theoretically, you'd need to have a procedure that plays the sound, waits until it's finished, then loops back and plays it. It would then detect when it is disconnected from redstone, and break the loop.
 

Any advice would be great!