Started by
TheGreenFax
on
Topic category: Help with Minecraft modding (Java Edition)
So, here's the problem. I've created a sound that sounds like wind, and I'm trying to get it to play at a random time. However, I'm not sure how to do this.
Is there a way to get this sound to play at a random time in my dimension with procedures?
Thanks.
On player update tick> if Random (0-1) = 0.01 (this will have it a 1% chance each tick, you might want it even less like 0.001), play sound *sound* at X Y Z. No idea if this will actually work, but it should in theory.
Doesn't seem to work, but maybe I'm doing something wrong?
On player update tick
if Random (0,1) = 0.01
do play at x, y, z, level: 1 pitch: 1 sound: CUSTOM:ambientsound
It should, you just have to have some luck and patience
add it as your dimension's biome's ambient noise. they added that in a new update.
On player tick update. With the random number like TheReallyFatChicken suggested. do play at x, y, z, level: 1 pitch: 1 sound: CUSTOM:ambientsound. But switch the x,y,z's to Entity's x,y,z's position