Sounds NOT playing when needed

Started by Regele on Wed, 07/15/2020 - 10:54

Topic category: Help with modding (Java Edition)

Last seen on 16:43, 16. Jul 2020
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sounds NOT playing when needed
Wed, 07/15/2020 - 10:55 (edited)

Hello,

So I want my custom sound to play randomly in my custom dimension... how can I do that?

Also I made a custom entity but the ambient sound is WAAAAYYY too often... how can I make it play less often?

 

Edited by Regele on Wed, 07/15/2020 - 10:55
Last seen on 17:22, 8. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
remove the ambient sound…
Thu, 07/16/2020 - 01:37

remove the ambient sound from your entity's properties page. create a procedure for the event "On entity tick update". in the procedure do something like IF random(0,1) < 0.01 DO "play sound at ...". 0.01 is average 1 sound per 5 seconds, lowering that number will make the sounds less frequent.

Last seen on 16:43, 16. Jul 2020
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
thank you guys!
Thu, 07/16/2020 - 16:44

thank you guys!