Randomizer

Started by 2Cool4u on Fri, 11/20/2020 - 21:51

Topic category: Help with modding (Java Edition)

Last seen on 18:35, 10. Sep 2021
Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Randomizer
Fri, 11/20/2020 - 21:51

Hi, I recently made a ranged weapon that I want to randomly shoot different bullets, my problem is this. I want the gun to shoot one of the ammo types that the player currently has in their inventory, only one. Everytime I try this, it either consumes 3 ammo and shoots 1 projectile, or only shoots one of the ammo types then moves the next when the first runs out. It's really weird and I could really use some help

 

Last seen on 19:15, 17. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
well why dont you give it a…
Wed, 02/17/2021 - 19:15

well why dont you give it a 33% chance to shoot either one with a randommizer