Procedure template "Generate number between 0 and 10" doesn't work [SOLVED]

Started by MargoxaTheGamer on Sat, 01/30/2021 - 17:25

Topic category: Troubleshooting, bugs, and solutions

Last seen on 00:12, 2. Jul 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Procedure template "Generate number between 0 and 10" doesn't work [SOLVED]
Mon, 05/17/2021 - 11:30 (edited)

When I used "Set Local: [My number variable] to: Random [0,1) * 1"

(so it should turn variable to a number between 0 and 1)

In my procedure, that should run when right clicked on block with "Testing stick(that will be a natural structure in the future)" nothing, that should be choosed randomly generated, I thought, that 50% chance just didn't happen, but it didn't happen even after many procedure calls.

That part of the structure, that should generate always is generating. But part, that should generate with 50% chance doesn't even after 20 tries.

Workspace file:

https://drive.google.com/file/d/1yIsprIigD2EKvwUhgrbK0fB0GlGNnc0u/view?usp=sharing

...

...

Structure generated in the game a few times.

Edited by MargoxaTheGamer on Mon, 05/17/2021 - 11:30
Last seen on 06:57, 30. Jul 2021
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry for my English. To…
Sun, 01/31/2021 - 07:58

Sorry for my English.
To generate a number between 0 (inclusive) and 10 (inclusive) do:
Do Local 'DoesGnerateForwrdRoad to: round (Random (0,1) * 10)

Then pay attention to the interlocking of the if ... then

Last seen on 00:12, 2. Jul 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Okay, thanks!
Wed, 02/03/2021 - 02:51

Okay, thanks!

Last seen on 00:12, 2. Jul 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
But after that I used "do…
Wed, 02/03/2021 - 02:52

But after that I used "do with 70%" chance instead and it worked just fine.