How do i create a working gun, with 3d model of bullet?

Started by evanbenn2333333 on

Topic category: Help with modding (Java Edition)

Last seen on 01:48, 30. Sep 2021
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i create a working gun, with 3d model of bullet?

I want to know how to make a funcioning gun and i can have manual, semi atomatic, and automatic guns? i tried ranged weopen but i couldent figure it out?

 

Last seen on 02:39, 28. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
All you have to do is make a…
Sun, 09/05/2021 - 10:33

All you have to do is make a ranged item. For manual, you can just keep it at default. At semi automatic (I'm guessing you can click and hold and it'll shoot like a machine gun), then you just tick the box that says shoot constantly when active. And for automatic, you just need a when item in mainhand tick procedure. Then you just make it shoot the bullet. And for a 3D model, you can make your own and export it as OBJ. You can do this on blockbench, or other apps if you know of any.

Last seen on 01:48, 30. Sep 2021
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah ok but how do i make…
Sun, 09/05/2021 - 10:54

yeah ok but how do i make the magezines store ammo and use it?

 

Last seen on 02:39, 28. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You mean you want them to…
Mon, 09/06/2021 - 09:20

You mean you want them to require bullets to use? Then just set the item for ammo to bullet or any item you made. For storing ammo inside the guns, it's a bit more complicated. Make a new variable (Type is number, Player lifetime) then basically when you equip your custom gun, each time it shoots it'll make the variable you made go down by 1. When that variable reaches 0, then it'll check if you have let's say 5 bullets in your inventory. If you don't, the gun won't shoot. If you do, it'll remove 5 bullets from your inventory, and set the variable back to 5. That way, you can store bullets in your gun. Or you could just do it the first way (much easier).