Started by
GendarmyY
on
Topic category: Help with MCreator software
I created a aggresive mob and I want it to give the player an effect when it attacks him. I just want to know if that's possible because it doesn't seems like there is a procedure for "when the mob attacks you" and the closest I found is " when player collides with mob " but the problem is that it gives the effect even when the mob doesn't attack the player, it just need the player to be close. :/
If there is any way to do that it would be really appreciated ! :)
( Excuse my english if I've made mistakes, english isn't my main language)
Actually, I've found how to do it. If anyone wants to know how;
You create a procedure (not a procedure with the mob, when you create a new elements you normally have "procedure") you make global trigger: "Entity attacked". Then after that you can use a procedure already made in the template library which is "check if current entity is player". Then you duplicate the line in if that says: "Is [Event/ target entity] (sub)type of [EntityPlayer]" and you take it off the "if" line. You now need to have a "__ AND __" which can be found in "Logic Operations", it's the first one with the equals sign, you can change the equals sign to "AND". You put it at the "if" line. In the first hole of "__AND__" you put the "Is [Event/ target entity] (sub)type of [EntityPlayer]" in it. In the second one, you take your duplicate and you change [Event/ target entity] to [Source entity] which can be found in "Minecraft components" and also replace [EntityPlayer] with the entity you created. In the "do" line, you simply put the "Add Potions" procedure that can be found in "Entity procedure. An dif you've done everything wright, normally an effect should be applied to the player when he get hit by the mob ! ;)
Thanks man you helped me alot!
Please upload an image.
Thank you so much!
thanks, i hope this works...
update:
mine didn't work apparently. i followed the steps, is it bc of the game version, im using 1.12.2 generator in 2020.5
Here's an image of the procedure if anyone didn't understand :)
https://imgur.com/a/z87NvF2
This really helped actually, not in the fact that i wanted to do that too, i just didnt know you could change the = into an "AND", so uhh, my bad i guess
Good afternoon, I want to ask a question, but I don't know how to do it individually, so I'll do it here. Does anyone know how to make my character transform into a mod that I create? For example, create a zombie and I want my character to transform into that zombie