Shoot an arrow at every monster around the Player

Started by Skittlq on

Topic category: Help with Minecraft modding (Bedrock Edition)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Shoot an arrow at every monster around the Player

I have everything sorted and it all works fine apart from the part where it shoots the arrow, I'm struggling to know where to shoot the arrows in the direction of the entity.

 

Here is my code so you can see what I'm trying to do

My Code

Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can try some maths:…
Wed, 09/28/2022 - 13:02

You can try some maths:

target position - player position = direction from player to target

For dx:

entity iteration x position - event/target entity x position

For dy:

entity iteration y position - event/target entity y position

For dz:

entity iteration z position - event/target entity z position

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dude thank you so god damn…
Mon, 10/03/2022 - 13:33

Dude thank you so god damn much, I have been trying to figure this out for far too long and I can finally finish this mod.

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Could you send a photo of…
Sat, 05/20/2023 - 17:54

Could you send a photo of how you look? I didn't quite understand how it should be, it would help me to finish my mod!