How do i make something happen when i hit a mob/creature?

Started by FurryCatGamer on

Topic category: General discussion

Last seen on 00:46, 2. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i make something happen when i hit a mob/creature?

i am trying to make something spawn when i hit a mob or creature with a sword with a sword enchant.  does anyone know how?

Last seen on 23:32, 27. Feb 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a new procedure, and…
Fri, 02/26/2021 - 19:10

Create a new procedure, and at the "Event trigger - triggered by external call or when (global trigger):" block, select "Before entity is hurt" from the list. This procedure will trigger every time an entity is hurt. Then, you can check if the source entity (the entity which hurt the mob) has a sword in it's hand, and if it has a special enchamtment on it, and if these conditions are true, you spawn the something.

Feel free to ask if I was not clear enough, and keep on modding chief :)

Last seen on 00:46, 2. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i check if the source…
Fri, 02/26/2021 - 23:30

how do i check if the source entity has a sword? i used to know but havent used it in a while so i forget.

Last seen on 00:46, 2. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
forgot to reply i…
Fri, 02/26/2021 - 23:37

forgot to reply i accidentally commented. i forgot how to check if the source entity has a sword

Last seen on 00:46, 2. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nvm i got it workin but now…
Sat, 02/27/2021 - 01:50

nvm i got it workin but now when it triggers, the entity i spawned spawned on the entity i hit.  do you know what i did wrong and how to fix it?
Screenshot 2021-02-26 184748.png

i think this is the the image^