How to make a mob set fire to a player if it hits him??

Started by EnderF on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a mob set fire to a player if it hits him??

I want to create a zombie that will set the player on fire if it hits the player. How do I implement this?

Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
On the "Triggers" tab of…
Sat, 08/21/2021 - 21:49

On the "Triggers" tab of your custom zombie, we need to add a procedure on the "When player collides with this entity" that sets the chosen entity (the player) on fire for the time that you want. For the procedure, we will need to use the "Set EVENT/TARGET on fire for [15] seconds" function that you can find in the "Entity Management" tab.

Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Important side note to…
Thu, 02/29/2024 - 14:45

Important side note to Kenshi's reply:

it might have worked like that once, but I think they've changed it.
For me it was the same procedure but I had to use "Source entity" instead of  "Event/target entity"

so my working procedure is "When player collides with this entity --> Set SOURCE ENTITY on fire for [15] seconds"

I think the Event/target entity is now refering to the mob itself.

I know it's been almost 3 years now, but I also know there are more people looking at this than just us three :)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There's an even trigger…
Tue, 11/19/2024 - 03:05

There's an even trigger known as "when entity attacked," and you could probably use that to check if the source entity is the mob, and set the attacked entity on fire when that specific mob attacks another entity. Although, I'm trying to do the same thing and it just crashes MCreator.