Consuming food item has 50/50 chance of good or bad outcome

Started by Zomber566 on Sat, 05/01/2021 - 23:39

Topic category: Help with modding (Java Edition)

Last seen on 00:39, 2. May 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Consuming food item has 50/50 chance of good or bad outcome
Sat, 05/01/2021 - 23:39

So I am trying to make a food item that has a 50/50 chance of either giving the player fire resistance or setting the player on fire, but I don't know how to make it work, and I haven't found any tutorials online, please help

Last seen on 23:32, 17. May 2021
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Use random  random gives…
Sun, 05/02/2021 - 00:51

Use random 
random gives numbers from 0 to 0.99999 (a lot of nines xd)
then you could use tigger "when food eaten".
put something like this
https://imgur.com/a/LC9pWsU

Last seen on 23:32, 17. May 2021
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
nice profile photo xd  
Sun, 05/02/2021 - 00:51

nice profile photo xd

 
I suggest you check our…
Sun, 05/02/2021 - 07:22

I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei