Randomizer

Started by 2Cool4u on

Topic category: Help with modding (Java Edition)

Last seen on 02:37, 20. Apr 2024
Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Randomizer

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:
  • 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