Want to create a weapon with random damage

Started by Sunk Funkle on

Topic category: Help with modding (Java Edition)

Last seen on 12:53, 1. May 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Want to create a weapon with random damage

Hello i want to create a weapon with an equal chance to deal anywhere from 1 to 12 damage and i dont know how

Last seen on 07:25, 16. May 2024
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To do so, i usually don't go…
Tue, 04/30/2024 - 16:55

To do so, i usually don't go through the range weapon prefab of MCreator. I create a simple item with the in-built range weapon model (just so it look like a range weapon in the hand). Then i make it call a procedure when right clicked.

Here is the procedure : https://ibb.co/8dWwSFh

After this, you can add cooldown to the weapon, make it get rid of an item in the inventory (like an arrow for example), damage the weapon, etc... don't hesitate to ask question if you need to know how to