Started by
electrovoyage.
on
Topic category: Feature requests and ideas for MCreator
Hello, i came here with an idea for a "Custom Random" block:
Random between: (number slot) And: (number slot) Rounding: (logic [true/false] slot)
For example: between 5 and 10 would get you random number in between them, for example 7.
Rounding would control whether the number generated could or couldn't have a "decimal place" (0.21 for example). Here's how it would be able to generate:
With rounding:
Math.floor(Math.random(num1,num2))
Or something like that, since it causes compilation errors.
Without rounding:
(Math.random(num1,num2))
Should work like that. I can make compilation code in Java.
Here's the Java compiler code:
(Not really compiler code, but a way it could work.)
Rounding, num1 and num2 would be fetched from the procedure block for this, and also it alredy exists in Tinkercad when coding serial microcontrollers such as Arduino Uno R3:
(C++ code)
Check out this plugin: https://mcreator.net/plugin/66938/simple-rng-plugin