Chance Procedure

Started by ImDaMilan on

Topic category: Help with MCreator software

Last seen on 19:51, 22. Sep 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Chance Procedure
Mon, 02/22/2021 - 19:05 (edited)

How can I make it so that there is only a certain chance that a procedure will happen, I want to make it so that when a player right clicks a block with a certain item it will usually spawn in a mob, but there is for example 1% chance that instead of spawning it, it will do something else... Is this possible, and if so, how? Or is there a way to set a variable to be a random number?

Edited by ImDaMilan on Mon, 02/22/2021 - 19:05
Last seen on 01:09, 29. Aug 2022
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In the procedure builder,…
Mon, 02/22/2021 - 19:22

In the procedure builder, look at templates and select do with a 70% chance. Then, change the 0.7 block to 0.01 and you're good to go