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

Started by EnderF on

Topic category: Help with modding (Java Edition)

Last seen on 15:18, 29. Aug 2021
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?

Last seen on 16:41, 12. Mar 2022
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.

Last seen on 02:32, 11. Apr 2024
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 :)