loop a sound?

Started by pedro1903 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
loop a sound?

i want to make a custom sound loop,it has 2.8 seconds (112 ticks) i tried doing a timer,searching on the forum and i found nothing

can someone please give me an anwser

Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You set up a variable for…
Thu, 07/11/2024 - 03:17

You set up a variable for time. (The left side tab under Resources) Name it and choose NUMBER and GLOBAL_MAP.

Then make this code inside the Update Tick (or Entity Tick Update)

https://ibb.co/KW8z6XR

You have to know the length of the sound in ticks (20 ticks per 1 second) 

Also, to stop the sound doubling/echoing for other sounds you can add this:

https://ibb.co/6J7rtv1

 

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
where is it? I can't find…
Wed, 07/31/2024 - 11:27

where is it? I can't find GlOBAL_BAP

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh,I find it
Wed, 07/31/2024 - 12:09

Oh,I find it