How to make pirate cannon?

Started by Beeft1 on

Topic category: Help with MCreator software

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make pirate cannon?
Sun, 02/05/2023 - 15:10 (edited)

Guys, I have such a question, I suffered for two days and could not realize, in short, there is a gun and you need it to shoot dynamite, or compare activated tnt to a certain radius. Please help with the procedure. Please send a screenshot of the procedure, with an explanation)

 

Edited by Beeft1 on Sun, 02/05/2023 - 15:10
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I haven't made a procedure,…
Sun, 02/05/2023 - 14:08

I haven't made a procedure, but a general idea of how to do it:
(Note that it would be simpler to use wither skulls or fire charges if either is acceptable)
 

Trigger: using your ranged weapon
If (Target entity is facing north)
Spawn TNT, velocity X 0, Y 0.5, Z -5
(Play with those numbers a bit until it shoots to the North well)
If (trget entity is facing east)
Spawn TNT,velocity X 5, Y 0.5, Z 0

And so on with the other directions
It may actually be possble to use the player's look vectors to give momentum to the TNT, but I can't guarantee that will work.