Problem with the randomizer

Started by DELT6 on

Topic category: Help with MCreator software

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Problem with the randomizer

Good afternoon,

 

I'm having an interesting problem, and I don't know how to fix it. Perhaps someone here will be able to figure out what the hell is going on.

 

So basically I made a simple slot machine and when you have gold in your hand, it takes it, run the randomizer and eitheir give you a diamond or dirt.

The problem here is that I sometimes get both, a diamond and dirt. I don't know why it does this and my randomizer is pretty straight forward.

https://prnt.sc/qhDCjZWCgKfc

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The problem here is that the…
Sun, 10/08/2023 - 10:03

The problem here is that the randomizers will allways go into the 1,01; 1,02 if you understand;
That means if you put it has to be equal to something, it will rarely work because it goes into smaller numbers.
If you instead of = use <, that usually works more for me.
Hope this helps

Use round to round the…
Sun, 10/08/2023 - 14:50

Use round to round the number to the integer, although you realistically should work with intervals, not equal checks for this purpose.

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

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks to all of you !
Mon, 10/09/2023 - 08:26

Thanks to all of you !