Started by
ShiroFliro
on
Topic category: Help with Minecraft modding (Java Edition)
This is what ive got atm and it just straight up crashes the game.
Edited by ShiroFliro on Sun, 05/15/2022 - 06:41
Topic category: Help with Minecraft modding (Java Edition)
This is what ive got atm and it just straight up crashes the game.
Create the desired weapon, go to triggers, and add the following under when living entity is hit with tool ...
And finally, select the sound or create/add a custom sound and select it. Save, then test.
i mean like. having a 50/50 chance of doing one sound or another
Set local variable vNum to Random [0,1)
If: vNum ≤ 0.15
Do: play sound 1
Else If: vNum ≤ 0.30
Do: play sound 2
Else If: vNum ≤ 0.45
Do: play sound 3
Else:
Do: play sound 4
This will play one of 4 sounds with a 15% chance for each of the first 3 and 55% for the 4th.
When your creating a sound, you can add multiple sound files to it and not just one. Doing this will play a random sound from those sounds when the sound is triggered