[SOLVED] Procedure where player looks

Started by Mars33311 on Wed, 07/29/2020 - 06:26

Topic category: Help with modding (Java Edition)

Last seen on 08:39, 19. Nov 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
[SOLVED] Procedure where player looks
Mon, 08/17/2020 - 10:49 (edited)

In my mod I want stuff like player teleporting where they looks and explosions there they look but don't know how. I have searched on the website about thing like raytrace but I realised if I, say, made the player move 5 blocks in their x raytrace, it means that they would be teleporting backwards or sideways if they are facing like z or away from x. This also means that if the player is looking partially up or down they still will only go in one direction. I am really stumped and don't know how to code. Please help or add a new feature in the procedure maker! 

Edited by Mars33311 on Mon, 08/17/2020 - 10:49
Last seen on 18:21, 28. Nov 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
when using the raytrace…
Wed, 07/29/2020 - 08:28

when using the raytrace function, use all 3 coordinates together. for example, do something like this: move target entity to (look X position of target entity), (look Y pos...), (look Z pos...). this will move your target entity to where they are looking.

Last seen on 08:39, 19. Nov 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry but I still don't…
Thu, 07/30/2020 - 06:57

Sorry but I still don't understand. Can you show me a picture of what you are trying to say, and I am pretty sure that it only works in one angle.

Last seen on 08:39, 19. Nov 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Does x mean directly in…
Tue, 08/11/2020 - 09:52

Does x mean directly in front of the player, and z the right of the player no matter where they look? Because my understanding of it is that they are more like North and East. If so, I do not know how one can do it.

Last seen on 16:24, 28. Nov 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
X = right, Y = up, Z = front…
Tue, 08/11/2020 - 10:22

X = right, Y = up, Z = front

look X is basically what's to the side of the player's vision, look Y is what's above the player's vision, and Z is what's in front of the player's vision

combining these gets you the coordinate of the block you're looking at

(Teleport target entity to (look X) (look Y) (look Z))

Last seen on 08:39, 19. Nov 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Oh, thank you very much!  
Thu, 08/13/2020 - 06:38

Oh, thank you very much!

 

Last seen on 18:35, 4. Dec 2020
Joined Apr 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Is there a way to set a max…
Tue, 10/27/2020 - 05:20

Is there a way to set a max distance?

Last seen on 08:39, 19. Nov 2020
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
hurn, if say the range if 5,…
Wed, 11/18/2020 - 07:28

hurn, if say the range if 5, I am thinking of checking if the block 5 blocks away from you is air, and if false, then check with the fourth, and so on

Last seen on 19:57, 4. Dec 2020
Joined Dec 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
hey uh how do you MAKE this…
Fri, 12/04/2020 - 19:48

hey uh how do you MAKE this though