How would I activate sounds using procedures?

Started by CatWillSCRATCH on

Topic category: Help with modding (Java Edition)

Last seen on 20:13, 9. Jul 2023
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I activate sounds using procedures?

I am making a collectable coin block with a custom model. I made it to where if an entity (most likely player) collides with the block, the block is set to air and the entity is given a coin item. I imported a .ogg file of a coin sound, but I'm not sure how to play it using just the procedure. Can anybody point me in the right direction?

Last seen on 03:09, 28. Mar 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In your block, go to…
Mon, 01/10/2022 - 04:15

In your block, go to triggers, When entity collides in the block, and add the following line:

(You will find it in World Management)

Play at x (x) y (y) z (z) level (#) pitch (#) category (change if needed) sound (look for your imported custom sound here)

Last seen on 20:13, 9. Jul 2023
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you! This works…
Mon, 01/10/2022 - 18:46

Thank you! This works perfectly!