How to set custom arrow/projectile?

Started by osh307 on

Topic category: Help with modding (Java Edition)

Last seen on 20:02, 25. Nov 2022
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to set custom arrow/projectile?
Fri, 11/25/2022 - 19:59 (edited)

Hey guys, hopefully I can explain what I'm trying to do that can be understood.

I have a multitool that I would like to have shoot a projectile.

I've made & tested the multitool item and it works. I then created a procedure and set it as the "on right click in air" action of the tool (refer to image below for procedure);

Shoot Procedute

I tested this in game and it works perfectly. You right click and it shoots an arrow!

What I would like to do now is find a way to change what it fires (as in, can i change the arrow to say... an iron nugget or some other element I've made)?

For example, if I created a "ranged item" element, one of the options you can set is an item for the ammo (refer to image below);

 

Is there a way I can set the "item for ammo" in my procedure? Or does someone know how to achieve something similar another way?

Any help would be appreciated.

Edited by osh307 on Fri, 11/25/2022 - 19:59
Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can make Key Bind That…
Sun, 09/23/2018 - 22:12

You can make Key Bind That will check if you have this tool in hand if Yes than change Variable to 1 if Pressed again and Variable is 1 than change to 2
Than you can code to your tool procedure that Will check if Variable = 1, do Shoot Arrow else If Variable  = 2, Do Shoot Iron Nugget also in between of the code you can make this procedure to also check for ammo in your inventory.

Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But that's only if you want…
Sun, 09/23/2018 - 22:16

But that's only if you want to use Other types of ammo otherwise by procedures you can only use Arrows :L

Last seen on 21:58, 27. Mar 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nice tutorial
Fri, 11/25/2022 - 15:01

nice tutorial