Problems with RNG in procedures

Started by Reb on

Topic category: Troubleshooting, bugs, and solutions

Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Problems with RNG in procedures

The "Random (0,1)" setting doesn't seem to be working, whenever I try to do anything with it, it just doesn't work. Two things I tried were sending a chat message to all players with the "Create Text With" block, but nothing ever appeared in the chat. Second was an "If" block that would activate if the random number was less than 0.5, giving the player an apple. Still, nothing ever happened. Please help, I need this to work for this mod!

 

Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you sent me the…
Thu, 08/02/2018 - 05:39

Can you sent me the workspace or pictures of the procedure? Maybe I can help

Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know how to do…
Fri, 08/03/2018 - 06:18

I don't know how to do either of those but I can describe the procedure:
If target entity has key in inventory

     Remove 1 key from target entity

     If block at x, y, z is Unlucky Food Crate

          If Random (0,1) is greater than 0.5

               Spawn Rotten Flesh gem

          (The above code is repeated for different items)

     (The above code is repeated for different crates)

     Remove block at x, y, z

I put all of the code in a single procedure for my convenience. The crates that trigger the procedure when right-clicked (all of the different kinds of crates) still disappear, but no items ever spawn.

Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What about making the key…
Fri, 08/03/2018 - 10:09

What about making the key trigger the procedure when right clicked. You already have a procedure block that checks for the block at X, y, z. 

Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried that and nothing…
Wed, 08/15/2018 - 06:17

I tried that and nothing happened. By now I'm guessing it's a bug in the procedure system.

Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe, my RNG block works…
Wed, 08/15/2018 - 07:47

Maybe, my RNG block works well though.

Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
All of a sudden it's working…
Wed, 08/15/2018 - 22:08

All of a sudden it's working. I don't know why or what I did, but now all of a sudden it's working.