How to make long explosions go in direction I'm looking.

Started by Kvngsavage118 on

Topic category: Help with modding (Java Edition)

Last seen on 04:09, 24. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make long explosions go in direction I'm looking.

So I am making this mod where you have a missle from a tank that explodes on impact. I want the explosion to be long explosions , as if I am facing forward, the explosion goes the way I am looking + 10 blocks.  But the way I have my code set, It only goes in one direction no matter what way I face.

Last seen on 05:10, 3. Dec 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You will have to use the …
Tue, 09/26/2023 - 03:44

You will have to use the "get (event/target entity) yaw direction" assuming the procedure block is directional. Of not, you will have to use math to determine the players direction, and then modify the x y z positions based on that.

Last seen on 04:09, 24. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If its not too much to ask…
Tue, 09/26/2023 - 18:42

If its not too much to ask could you show me an example of a procedure like what you described?