Started by
FurryCatGamer
on
Topic category: General discussion
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?
Topic category: General discussion
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?
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 :)
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.
forgot to reply i accidentally commented. i forgot how to check if the source entity has a sword
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^