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

Started by QB on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined May 2019
Points:
888

User statistics:

  • Modifications: 1
  • Forum topics: 31
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 122
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!

Active 3 months ago
Joined Jan 2020
Points:
887

User statistics:

  • Modifications: 3
  • Forum topics: 23
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 208
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

Active 4 years ago
Joined May 2019
Points:
888

User statistics:

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

Alright, thanks for informing me!

Active 2 years ago
Joined Oct 2019
Points:
689

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
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?

Active 4 years ago
Joined May 2019
Points:
888

User statistics:

  • Modifications: 1
  • Forum topics: 31
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 122
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!

Active 2 years ago
Joined Oct 2019
Points:
689

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
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

Active 5 days ago
Joined Apr 2019
Points:
856

User statistics:

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

i know how

 

Active 4 years ago
Joined May 2019
Points:
888

User statistics:

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

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

Active 5 days ago
Joined Apr 2019
Points:
856

User statistics:

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

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

Active 4 years ago
Joined May 2019
Points:
888

User statistics:

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

Thanks for your help!

Active 4 years ago
Joined May 2019
Points:
888

User statistics:

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

How can I open the file you sent me?

Active 5 days ago
Joined Apr 2019
Points:
856

User statistics:

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

sorry i accidently sent the procedure

Active 2 years ago
Joined Oct 2016
Points:
857

User statistics:

  • Modifications: 0
  • Forum topics: 24
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 66
@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

Active 5 months ago
Joined Mar 2021
Points:
1014

User statistics:

  • Modifications: 3
  • Forum topics: 37
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 451
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