is there a way to randomise what drops from a block?

Started by UtahPlaysYT on

Topic category: General discussion

Active 4 years ago
Joined Jul 2019
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
is there a way to randomise what drops from a block?

is there a way that i could make it when i break a block it drops something different every time such as it would drop cobblestone and then when you break the same type of block it would drop a bone block or is this not possible yet?

 

Active 3 years ago
Joined Mar 2020
Points:
1279

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1145
This is possible, use…
Mon, 06/08/2020 - 18:36

This is possible, use procedures.

If:   [Random number 0,1] = [0.5] 

  Do: [Spawn Gem at x y z (item)]

This procedure has a 50% chance of dropping the chosen item. To change the percentage, change the number. (40% = 0.4)

(3% = 0.03)

Active 4 years ago
Joined Jul 2019
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
thanks would this be…
Mon, 06/08/2020 - 18:45

thanks would this be possible with more then 2 item drops?

 

Active 3 years ago
Joined Mar 2020
Points:
1279

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1145
Yes, just duplicate the “if…
Mon, 06/08/2020 - 18:48

Yes, just duplicate the “if do” block.

(Keep in mind, that if you do that there is a chance of it dropping both, if you don’t want it to drop both but still with the chance of one of them dropping, tell me) 

Active 4 years ago
Joined Jul 2019
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
what have i done wrong as…
Mon, 06/08/2020 - 19:00

what have i done wrong as its not dropping either of the drops i have selected.

event - triggered by external call or when (global trigger): a block is broken

if random [0,1} = 0.5

do    Spawn gem fossil at x: x  y: y  z: z

         Spawn gem fossil at x: x  y: y  z: z

Active 4 years ago
Joined Jul 2019
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
btw they are two different…
Mon, 06/08/2020 - 19:00

btw they are two different fossils

 

Active 3 years ago
Joined Mar 2020
Points:
1279

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1145
Can you show an image of the…
Mon, 06/08/2020 - 19:03

Can you show an image of the procedure? (Use Imgur)

Active 4 years ago
Joined Jul 2019
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
(No subject)
Mon, 06/08/2020 - 19:06

here

Active 3 years ago
Joined Mar 2020
Points:
1279

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1145
1. There should be no global…
Mon, 06/08/2020 - 19:16

1. There should be no global trigger, just the "When Block Destroyed by Player" trigger that is chosen within the block creator itself.

 

2. I meant that you have another if procedure that has the other drop

 

3. Keep in mind that this will drop with a 50% chance, and wont happen each time

Active 4 years ago
Joined Jul 2019
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
so like this im not quite…
Mon, 06/08/2020 - 19:27

so like this im not quite sure i understood what you said but is this right

https://imgur.com/a/0ffpY8i

Active 3 years ago
Joined Mar 2020
Points:
1279

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1145
Yes that is correct, just…
Mon, 06/08/2020 - 19:28

Yes that is correct, just make sure that it is triggered from inside the block creator.

Active 4 years ago
Joined Jul 2019
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
its on when block destroyed…
Mon, 06/08/2020 - 19:33

its on when block destroyed by player but the its just dropping the block itself and not the custom drops

Active 3 years ago
Joined Mar 2020
Points:
1279

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1145
Set the block drop to 0.
Mon, 06/08/2020 - 19:36

Set the block drop to 0.

Active 4 years ago
Joined Jul 2019
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
um now its not dropping…
Mon, 06/08/2020 - 19:42

um now its not dropping anything