Started by
Rednax
on
Topic category: Help with MCreator software
I wish to make a sword with a lifesteal effect on it. Basically, this means you get Regeneration for a short time after hitting entities. The problem is, I need a way to give Regeneration to the player, upon hitting a non-player entity, such as a zombie.
If you use the global Entity attacked trigger it will give you the entity who attacked in the Source entity and the entity who was attacked in the Event/target entity. You'll need to check if the Source entity is a player and if it is holding the sword in its hand, and if you want you can check if the Event/target entity is a zombie or other type of mob to make it specific. There's a block in the Entity procedures called Add potion with level _ and duration _ to _ type _, which you can use to give the Source Entity regeneration. You could also use the When living entity is hit with tool trigger in the sword's triggers in much the same way.