[SOLVED] Telekinesis power like?

Started by Noxvern on Thu, 06/11/2020 - 13:21

Topic category: Help with modding (Java Edition)

Last seen on 07:06, 17. Sep 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
[SOLVED] Telekinesis power like?
Sun, 09/05/2021 - 22:20 (edited)

Hello everyone I need help with a procedure,

My intention is to create a power that causes the player to hit the keybind (as long as he has a certain item in his inventory) and is looking at a mob / player, the mob / the player (he is looking at) gets the effects of X potion. Is that possible with procedures?

I alredy created the keybind to use that power and I know with the "if / do" procedure I can do the item requeriment. But I dont know how to do the rest ^^'

Edited by Noxvern on Sun, 09/05/2021 - 22:20
You could use raytrace look…
Thu, 06/11/2020 - 16:26

You could use raytrace look position to get coordinates player is looking at.

To target entity at coordinates, you will need to wait for 2020.4: https://mcreator.net/tracker/issue/47617

Last seen on 07:06, 17. Sep 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
So for now I can't do what I…
Thu, 06/11/2020 - 17:04

So for now I can't do what I describe? I'll have to whait then :c

Last seen on 23:27, 4. Apr 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You could save the…
Thu, 06/11/2020 - 22:50

You could save the coordinates where you are looking in global variables and create a procedure on the mob at entity tick that will verify if its coordinates correspond to the ones you are looking, then apply him poison

Last seen on 07:06, 17. Sep 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yeah but what about the…
Fri, 06/12/2020 - 04:40

Yeah but what about the players? I want to make this a power and the player can used eveytime he want, no an especific mob on an especific place ^^'

Last seen on 23:27, 4. Apr 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You can constantly update…
Sun, 06/14/2020 - 02:53

You can constantly update the global variables to know which position player is looking and if you want to affect any mob you have to do if entity is subtype of ... do, you just need to add ORs for every mob you want the power to affect