Started by
Benoniusthecat
on
Topic category: Help with Minecraft modding (Java Edition)
I was thinking about making a kind of radio receiver thing that when used, will give you a random message with help on the mod, but how could I randomize it? If you have a solution, let me know! (NOTE: I am not wanting this to be a block)
Edited by Benoniusthecat on Sat, 09/21/2019 - 17:24
Try creating a local number variable and in a procedure set it to random [0,1]
Then make an if statement to test if it is 0 or 1 and put the messages in those.
This might also help.
https://www.youtube.com/watch?v=GE0kHWQLy4c&list=PLAeL-oIFIEngE6jRgFYeF…
https://www.youtube.com/watch?v=SBtTsNYiHzw
If you don't want a 50/50 randomiser but want to have, say 5 messages of which 1 has to appear at random: 1/8 = 0.125.PROCEDURE:
EDIT: the 0.125 was meant for 8 results. change that number to 1/5 = 0.2
I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
Thanks! This worked after a few tries and I really like the result!