How would I activate sounds using procedures?

Started by CatWillSCRATCH on Mon, 01/10/2022 - 03:14

Topic category: Help with modding (Java Edition)

Last seen on 16:47, 24. Apr 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How would I activate sounds using procedures?
Mon, 01/10/2022 - 03:14

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 05:23, 20. May 2022
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 16:47, 24. Apr 2022
Joined Jan 2022
Points:

User statistics:

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

Thank you! This works perfectly!