How do i make a sound play

Started by Pedro Bcana on Fri, 08/30/2019 - 23:27

Topic category: Help with MCreator software

Last seen on 15:43, 7. May 2020
Joined Jul 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
How do i make a sound play
Fri, 08/30/2019 - 23:27

How do i make a sound play once, and only play again if it happens again, example:break a block and then play a sound once

Last seen on 20:25, 8. May 2020
Joined Aug 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Create a new procedure…
Sat, 08/31/2019 - 13:53

Create a new procedure. Under world management, find: "Play at x y z, level 1 pitch 1 sound NAMEOFSOUND".

 

Now your procedure has been created, go to your block (5th page). Pick the one that says "When block destroyed by player" and add the procedure you just created.

 

Now this block will play the sound you selected whenever the block is destroyed and voila.

If you haven't imported a sound yet, you won't be able to select the sound you want inside of your procedure so if that's the case, go to the "Resources" tab and press "Sound files". Now you can import your audio file in OGG format. If you have your soundfile in the wrong format, use an online converter to make it an OGG file first.