How to make a a mob teleport randomly when they got hurt?

Started by QB on

Topic category: Help with modding (Java Edition)

Last seen on 15:10, 2. Feb 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a a mob teleport randomly when they got hurt?

So I'm making End-Infected mob, and I want them to teleport randomly when they got hurt like enderman? Is there a way to make this possible? Can you guys help me? Thanks a lot!

Last seen on 16:22, 8. Jan 2024
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have been on MCreator…
Mon, 06/15/2020 - 18:53

I have been on MCreator since November (joined the website in January) and so far there is no way how to do that so far, I will open a issue on that now

Last seen on 15:10, 2. Feb 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright, thanks for…
Mon, 06/15/2020 - 18:55

Alright, thanks for informing me!

Last seen on 20:25, 3. Sep 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could maybe add a x y z…
Mon, 06/15/2020 - 19:01

You could maybe add a x y z coords procedure when the mob gets hurt?

Last seen on 15:10, 2. Feb 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'll do some testing about…
Mon, 06/15/2020 - 19:03

I'll do some testing about the coordination procedure. Thanks for the idea!

Last seen on 20:25, 3. Sep 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay gotcha :) If you cannot…
Mon, 06/15/2020 - 19:06

Okay gotcha :) If you cannot do it then I'll try to as well :D

Last seen on 01:47, 28. Feb 2024
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i know how  
Mon, 06/15/2020 - 19:15

i know how

 

Last seen on 15:10, 2. Feb 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, then how can you make…
Mon, 06/15/2020 - 19:16

Oh, then how can you make this possible? darthsae?

Last seen on 01:47, 28. Feb 2024
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I will send an example…
Mon, 06/15/2020 - 20:45

I will send an example procedure once i make the basic code.

Last seen on 15:10, 2. Feb 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for your help!
Tue, 06/16/2020 - 14:00

Thanks for your help!

Last seen on 15:10, 2. Feb 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I open the file you…
Tue, 06/16/2020 - 14:03

How can I open the file you sent me?

Last seen on 01:47, 28. Feb 2024
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry i accidently sent the…
Thu, 07/09/2020 - 15:21

sorry i accidently sent the procedure

Last seen on 19:56, 31. Oct 2022
Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@QB this is pretty late…
Tue, 10/19/2021 - 21:36

@QB this is pretty late notice but you can't open .ptpl files outside of MCreator

create an empty procedure (preferably in "on entity hurt") and click the Import Procedure button in the top right, then navigate to wherever you downloaded the .ptpl file

Last seen on 05:58, 19. Mar 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is quite easy Just use…
Wed, 10/20/2021 - 11:28

This is quite easy

Just use trigger entity is hurt then randomize the TP command

If 10% then tp to some coordinates

Else tp to different coordinates

and so on