How to detect if an entity is standing in front of another?

Started by TheCatalystGaming on Wed, 02/03/2021 - 02:02

Topic category: Advanced modding

Last seen on 19:07, 12. May 2022
Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to detect if an entity is standing in front of another?
Wed, 02/03/2021 - 02:02

I have an entity thas basically supposed to be a "Claymore" mine, which explodes whenever something walks in front of it. How could I make the mine detect when a mob walks in front of it, keeping in mind that it can be placed in any horizontal direction? Any help would be appreciated.

You could use entity in…
Wed, 02/03/2021 - 09:23

You could use entity in range procedure block for this, or for each entity in range, and do more checks inside the loop