Procedures

Started by Black Shadow on Tue, 07/26/2022 - 13:20

Topic category: Help with modding (Java Edition)

Last seen on 13:11, 27. Jul 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Procedures
Tue, 07/26/2022 - 13:20

Hi !

I would like to make a procedure that checks at each tick (already put in the trigger) if a neutral or hostile creature is targeting/targeting the player and if so give it a knockback in the opposite direction to the player.

Only I can't find blocks to check if the player is targeted or not...

Is there an alternative please?

 

Have a good day !

Last seen on 22:06, 3. Oct 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You might have to use the …
Tue, 07/26/2022 - 13:38

You might have to use the "entity sets attack target" trigger instead but I don't know how you could do the knockback effect. Maybe try playing around with the "attempt to override motion vector" block.

Last seen on 16:12, 3. Oct 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yeah its gonna be the…
Tue, 07/26/2022 - 13:49

yeah its gonna be the attempt to override motion vector block

Last seen on 22:06, 3. Oct 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
maybe find the opposite of…
Tue, 07/26/2022 - 13:57

maybe find the opposite of their look direction which technically sends them backwards and put it in the x and z vectors?

Last seen on 13:11, 27. Jul 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
@ImOd102 Yes I saw the …
Wed, 07/27/2022 - 13:04

@ImOd102

Yes I saw the "entity sets attack target" block but I don't understand how to use it because you can't put on an 'if' block

Last seen on 22:06, 3. Oct 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I mean trigger like "on…
Wed, 07/27/2022 - 13:56

I mean trigger like "on player tick".