Problems with RNG in procedures

Started by Reb on Wed, 08/01/2018 - 18:00

Topic category: Bugs and solutions

Last seen on 05:52, 31. Aug 2018
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Problems with RNG in procedures
Wed, 08/01/2018 - 18:00

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!

 

Last seen on 12:02, 15. Oct 2020
Joined Mar 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 05:52, 31. Aug 2018
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 12:02, 15. Oct 2020
Joined Mar 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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. 

Last seen on 05:52, 31. Aug 2018
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 12:02, 15. Oct 2020
Joined Mar 2017
User points:

User statistics:

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

Maybe, my RNG block works well though.

Last seen on 05:52, 31. Aug 2018
Joined Dec 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.